Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot process argument transformation on parameter 'TEXT'. Cannot convert value to type System.String. #28

Open
3 tasks done
s-dobson opened this issue Nov 1, 2024 · 7 comments · Fixed by #29
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@s-dobson
Copy link

s-dobson commented Nov 1, 2024

Bug description

When running the report with ProtectionGroup in the config file set to anything other than 0 I'm getting the following error

VERBOSE: [ 15:13:11:530 ] [ Document ] - Discovered Protection Group <Group Name>.
WARNING: [ 15:13:11:781 ] [ Document ] - Cannot process argument transformation on parameter 'TEXT'. Cannot convert
value to type System.String.

Which then gives the error -

New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.
At line:1 char:1
+ New-AsBuiltReport -Report VMware.SRM -Target '<VCSA URL> ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport

If I then set ProtectionGroup to 0 but then RecoveryGroup to anything higher than 1, I get the below error but the report gets generated just with the Virtual Machine sections empty.

VERBOSE: [ 15:14:11:992 ] [ Document ] - Discovered VM Setting <VM Name>.
WARNING: [ 15:14:11:996 ] [ Document ] - Cannot process argument transformation on parameter 'TEXT'. Cannot convert value to type System.String.

I'm not sure if this is related to the virtual machines in question having a dash in their name but any help would be grateful.

Command-line input

New-AsBuiltReport -Report VMware.SRM -Target 'VCSA URL' -Credential $creds -Format Text,Html,Word -OutputFolderPath 'C:\temp\SRMReport' -ReportConfigFilePath 'C:\temp\SRMReport\AsBuiltReport.VMware.SRM.json' -Verbose

Steps to reproduce

  1. Set ProtectionGroup to 1
  2. Run Script
  3. Get Error in output of PS Console

Expected behaviour

Being able to report on any level for both Protection Groups and Recovery Groups

Screenshots

No response

Operating System

Windows 11 - 23H2

PowerShell Version

Name Value


PSVersion 5.1.22621.4249
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.4249
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

PowerShell Modules

Name Version


AsBuiltReport.Core 1.4.0
AsBuiltReport.VMware.SRM 0.4.5
PScribo 0.10.0

Additional Context

No response

Before submitting

@s-dobson s-dobson added the bug Something isn't working label Nov 1, 2024
@rebelinux
Copy link
Collaborator

Could you run these cmdlet and send me the logs?

Enable powershell debugging:

$global:VerbosePreference = 'Continue'
$global:DebugPreference = 'Continue'
Start-Transcript -Path .\Output.log
New-AsBuiltReport -Report VMware.SRM -Target 'VCSA URL' -Credential $creds -Format Text,Html,Word -OutputFolderPath 'C:\temp\SRMReport' -ReportConfigFilePath 'C:\temp\SRMReport\AsBuiltReport.VMware.SRM.json' -Verbose <-- change this part with your parameters-->
Stop-Transcript

The commands generate the Output.log file which you can send to me at:

[email protected]

After saving the log, reset powershell to default settings:

$global:VerbosePreference = 'SilentlyContinue'
$global:DebugPreference = 'SilentlyContinue'

@s-dobson
Copy link
Author

s-dobson commented Nov 4, 2024

Sorry for the delay on this. The log file has been sent.

@rebelinux rebelinux mentioned this issue Nov 4, 2024
7 tasks
@rebelinux rebelinux reopened this Nov 4, 2024
@rebelinux rebelinux mentioned this issue Nov 4, 2024
7 tasks
@rebelinux
Copy link
Collaborator

Can you test version 0.4.6?

Let me know the results!

 Update-Module -Name AsBuiltReport.VMware.SRM -Force
 Import-Module -Name AsBuiltReport.VMware.SRM -Force

@s-dobson
Copy link
Author

s-dobson commented Nov 5, 2024

This looks to have completed but with some issues.

For each Protection group it gives the following error and leaves the last column empty in the table -
WARNING: [ 08:30:34:375 ] [ Document ] - Unable to process Recovery Plan values

Also in the Protection Groups table the Protected Datastores and Protected VM's are showing ID's rather than names. So Datastore-datastore-xxxxxx and VirtualMachine-vm-xxxx

Also within the Recovery Group its unable to process the following, leaving an empty last column in the table -

WARNING: [ 08:31:56:030 ] [ Document ] - Unable to process Status values
WARNING: [ 08:31:56:033 ] [ Document ] - Unable to process Skip Guest ShutDown values

@rebelinux
Copy link
Collaborator

SRM and Vcenter versions?

@s-dobson
Copy link
Author

s-dobson commented Nov 5, 2024

SRM Version - 8.6
VCSA - 7.0 U3t

@rebelinux
Copy link
Collaborator

Can you test version 0.4.7?

i can't reproduce your issue but want to see if the problem can be resolve by not transforming empty values to '--'

 Update-Module -Name AsBuiltReport.VMware.SRM -Force
 Import-Module -Name AsBuiltReport.VMware.SRM -Force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants