VMware Cloud Community
Rotoi
Contributor
Contributor

"The 'propSet' paramter should not be null." error with Invoke-VMScript

Hi,

"The 'propSet' paramter should not be null." error appears whevener I use the Invoke-VMScript command and the script doesn't run. I uninstalled and reinstalled the powercli module, it still appears. I installed the module from the install-module command online. What is this error ?

Thanks

Reply
0 Kudos
7 Replies
LucD
Leadership
Leadership

How did you call Invoke-VMScript?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Rotoi
Contributor
Contributor

I called it with the command

Invoke-VMScript -ScriptText $Script -VM $VMName -ScriptType Powershell -GuestCredential $cred -Verbose

All variables are set.

Reply
0 Kudos
LucD
Leadership
Leadership

And which PowerCLI, PS, vSphere version?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Rotoi
Contributor
Contributor

PowerCLI version is 13.0.0.20829139, Powershell version is 5.1.22621.963, and vSphere version is 7.0.3 build 20845200.

 

 

Reply
0 Kudos
LucD
Leadership
Leadership

I have seen this error before, most of the times it involved a corrupt installation of PowerCLI.
What does the following return?

 

Get-Module -Name VMware* -ListAvailable


Btw, did my answer to your post last December help you?

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
Rotoi
Contributor
Contributor

It returns this :

 

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 12.6.0.... VMware.CloudServices {Connect-Vcs, Disconnect-Vcs, Get-VcsOrganizationRole, Get-VcsService...}
Script 8.0.0.2... VMware.DeployAutomation {Add-CustomCertificate, Add-DeployRule, Add-ProxyServer, Add-ScriptBundle...}
Script 0.0 Vmware.Hv.Helper {Get-HVApplication, Set-HVPool, Get-HVvCenterServerHealth, Get-HVlicense...}
Script 8.0.0.2... VMware.ImageBuilder {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile...}
Manifest 13.0.0.... VMware.PowerCLI
Script 12.6.0.... VMware.PowerCLI.Sdk
Script 12.6.0.... VMware.PowerCLI.Sdk.Types
Script 12.6.0.... VMware.PowerCLI.VCenter {Get-VIMachineCertificate, Get-VITrustedCertificate, Remove-VITrustedCertificate, New-VIMachineCertificateSigningRequest...}
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ap...
Script 12.6.0.... VMware.PowerCLI.VCenter.Types.Ce...
Script 4.0.0.2... VMware.Sdk.Nsx.Policy {Connect-NsxServer, Connect-NsxVmcServer, Disconnect-NsxServer, Disconnect-NsxVmcServer...}
Script 1.0.110... VMware.Sdk.Runtime {Get-ServerConfiguration, New-ServerConfiguration, Add-ServerConfiguration, Set-ServerConfiguration...}
Manifest 8.0.110... VMware.Sdk.vSphere
Script 3.0.110... VMware.Sdk.vSphere.Appliance {Invoke-GetItemHealthMessages, Invoke-GetHealthSettings, Invoke-UpdateHealthSettings, Invoke-CreateLocalAccounts...}
Script 2.0.110... VMware.Sdk.vSphere.Appliance.Access {Invoke-GetAccessConsolecli, Invoke-SetAccessConsolecli, Invoke-GetAccessDcui, Invoke-SetAccessDcui...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Health {Invoke-GetHealthApplmgmt, Invoke-GetHealthDatabase, Invoke-GetHealthDatabaseStorage, Invoke-GetHealthLoad...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Inf... {Invoke-ExportInfraprofileConfigs, Invoke-ImportInfraprofileConfigsAsync, Invoke-ListInfraprofileConfigs, Invoke-ValidateInfraprofileConfigsAsync...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Loc... {Invoke-GetLocalAccountsGlobalPolicy, Invoke-SetLocalAccountsGlobalPolicy, Initialize-LocalAccountsPolicyInfo}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Log... {Invoke-GetLoggingForwarding, Invoke-SetLoggingForwarding, Invoke-TestLoggingForwarding, Initialize-LoggingForwardingConfig...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Net... {Invoke-CreateNetworkingDnsDomains, Invoke-ListNetworkingDnsDomains, Invoke-SetNetworkingDnsDomains, Invoke-GetNetworkingDnsHostname...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Rec... {Invoke-GetSystemNameArchive, Invoke-ListSystemNameArchives, Invoke-ValidateRecoveryBackup, Invoke-ListBackupJobDetails...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Sup... Invoke-GetSupportBundleComponents
Script 1.0.110... VMware.Sdk.vSphere.Appliance.System {Invoke-GetSystemGlobalFips, Invoke-SetSystemGlobalFips, Invoke-ListSystemStorage, Invoke-ResizeExSystemStorage...}
Script 1.0.110... VMware.Sdk.vSphere.Appliance.Update {Invoke-InstallVersionPending, Invoke-ListUpdatePending, Invoke-PrecheckVersionPending, Invoke-StageAndInstallVersionPending...}
Script 1.0.110... VMware.Sdk.vSphere.Cis {Invoke-CreateSession, Invoke-DeleteSession, Invoke-GetSession, Invoke-CancelTask...}
Script 1.0.110... VMware.Sdk.vSphere.Cis.Tagging {Invoke-AddToUsedByCategoryId, Invoke-CreateCategory, Invoke-DeleteCategoryId, Invoke-GetCategoryId...}
Script 1.0.110... VMware.Sdk.vSphere.Content {Invoke-GetContentConfiguration, Invoke-UpdateContentConfiguration, Invoke-FindContentLibrary, Invoke-GetLibraryIdContent...}
Script 1.0.110... VMware.Sdk.vSphere.ContentLibrary {Invoke-GetLibraryItemVersionLibraryChanges, Invoke-ListLibraryItemContentChanges, Invoke-CancelDownloadSessionId, Invoke-CreateLibraryItemDownloadSession...}
Script 1.0.110... VMware.Sdk.vSphere.Esx.Hcl {Invoke-DownloadHclCompatibilityDataAsync, Invoke-GetHclCompatibilityDataStatus, Invoke-ListHostHclCompatibilityReleases, Invoke-CreateHostCompatibilityReportAsync...}
Script 1.0.110... VMware.Sdk.vSphere.Esx.Hosts {Invoke-ListHostSoftwareInstalledComponents, Invoke-GetSoftware, Initialize-HostsSoftwareHostCredentials}
Script 1.0.110... VMware.Sdk.vSphere.Esx.Settings {Invoke-DeleteClusterDraftSoftwareAddOn, Invoke-DeleteHostDraftSoftwareAddOn, Invoke-GetClusterDraftSoftwareAddOn, Invoke-GetClusterSoftwareAddOn...}
Script 1.0.110... VMware.Sdk.vSphere.VAPI.Metadata {Invoke-GetCliCommand, Invoke-GetCliCommandFingerprint, Invoke-ListMetadataCliCommand, Invoke-GetComponentIdAuthentication...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter {Invoke-GetCluster, Invoke-ListCluster, Invoke-CreateDatacenter, Invoke-DeleteDatacenter...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Authe... Invoke-CreateAuthenticationToken
Script 1.0.110... VMware.Sdk.vSphere.vCenter.CertM... {Invoke-GetCertificateManagementSigningCertificate, Invoke-RefreshSigningCertificate, Invoke-SetCertificateManagementSigningCertificate, Invoke-GetCertificateManagementTls...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Content {Invoke-CreateContentRegistriesHarbor, Invoke-DeleteRegistryRegistriesHarbor, Invoke-GetRegistryRegistriesHarbor, Invoke-ListContentRegistriesHarbor...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Datas... Invoke-GetDatastoreDefaultPolicy
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Deplo... {Invoke-CheckMigrateActiveDirectory, Invoke-CancelDeploymentHistory, Invoke-GetDeploymentHistory, Invoke-PauseDeploymentHistory...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Guest {Invoke-CreateGuestCustomizationSpecs, Invoke-DeleteNameGuestCustomizationSpecs, Invoke-ExportNameCustomizationSpecs, Invoke-GetNameGuestCustomizationSpecs...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Identity {Invoke-CreateIdentityProviders, Invoke-DeleteProviderIdentity, Invoke-GetProviderIdentity, Invoke-ListIdentityProviders...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Inven... {Invoke-GetInventoryDatastore, Invoke-GetInventoryNetwork}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.ISO {Invoke-MountIsoImage, Invoke-UnmountIsoImage, Initialize-IsoImageMountRequestBody, Initialize-IsoImageUnmountRequestBody}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.LCM {Invoke-CreateLcmDiscoveryAssociatedProducts, Invoke-DeleteProductDiscoveryAssociatedProducts, Invoke-GetProductDiscoveryAssociatedProducts, Invoke-ListLcmDiscoveryAssociatedProduc...
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Names... {Invoke-ListNamespaceManagementSoftwareClusterAvailableVersions, Invoke-GetNamespaceManagementClusterCompatibilityV2, Invoke-ListNamespaceManagementClusterCompatibility, Invoke-Dis...
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Names... {Invoke-CreateNamespaceDomainSubjectAccess, Invoke-DeleteNamespaceDomainSubjectAccess, Invoke-GetNamespaceDomainSubjectAccess, Invoke-SetNamespaceDomainSubjectAccess...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.OVF {Invoke-ListOvfExportFlag, Invoke-ListOvfImportFlag, Invoke-CreateOvfLibraryItem, Invoke-DeployOvfLibraryItemId...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Services {Invoke-GetService, Invoke-GetServices, Invoke-RestartService, Invoke-StartService...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Storage {Invoke-ListPoliciesEntitiesCompliance, Invoke-CheckCompatibilityPolicyPolicies, Invoke-ListStoragePolicies, Invoke-ListPoliciesComplianceVm...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Syste... {Invoke-GetSystemConfigDeploymentType, Invoke-SetSystemConfigDeploymentType, Invoke-GetSystemConfigPscRegistration, Invoke-RepointSystemConfigPscRegistration...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Tagging Invoke-ListAssociations
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Topology {Invoke-GetNodeTopology, Invoke-ListTopologyNodes, Invoke-ListTopologyReplicationStatus}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Trust... {Invoke-CreateTrustedInfrastructureTrustAuthorityHostsAttestation, Invoke-GetHostTrustedInfrastructureAttestation, Invoke-DeleteClusterVersionBaseImagesAsync, Invoke-GetClusterBase...
Script 1.0.110... VMware.Sdk.vSphere.vCenter.VCHA {Invoke-GetClusterActive, Invoke-DeployVchaClusterAsync, Invoke-FailoverVchaClusterAsync, Invoke-GetVchaCluster...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.Vm {Invoke-GetVmHardwareBoot, Invoke-UpdateVmHardwareBoot, Invoke-ConnectVmCdrom, Invoke-CreateVmHardwareCdrom...}
Script 1.0.110... VMware.Sdk.vSphere.vCenter.VmTem... {Invoke-CheckInTemplateLibraryItemVmCheckOuts, Invoke-CheckOutTemplateLibraryItemCheckOuts, Invoke-DeleteTemplateLibraryItemVmVmTemplateCheckOuts, Invoke-GetTemplateLibraryItemVmVm...
Script 1.0.110... VMware.Sdk.vSphere.vStats {Invoke-CreateStatsAcqSpecs, Invoke-DeleteIdStatsAcqSpecs, Invoke-GetIdStatsAcqSpecs, Invoke-ListStatsAcqSpecs...}
Script 1.0.110... VMware.Sdk.vSphereRuntime {New-vSphereServerConfiguration, Get-vSphereServerConfiguration, Set-vSphereServerConfiguration, Set-vSphereServerConfigurationApiKey...}
Script 8.0.1.2... VMware.Vim
Script 13.0.0.... VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
Script 13.0.0.... VMware.VimAutomation.Cloud {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, Get-Catalog...}
Script 13.0.0.... VMware.VimAutomation.Common {Get-PowerCLIContext, Get-Task, New-OAuthSecurityContext, Stop-Task...}
Script 13.0.0.... VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer...}
Script 13.0.0.... VMware.VimAutomation.Hcx {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance, Get-HCXComputeProfile...}
Script 13.0.0.... VMware.VimAutomation.HorizonView {Connect-HVServer, Disconnect-HVServer}
Script 12.0.0.... VMware.VimAutomation.License Get-LicenseDataManager
Script 13.0.0.... VMware.VimAutomation.Nsxt {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtGlobalManagerService, Get-NsxtPolicyService...}
Script 13.0.0.... VMware.VimAutomation.Sdk {Get-ErrorReport, Get-PSVersion, EnableParameterCompleters, Get-InstallPath}
Script 13.0.0.... VMware.VimAutomation.Security {Add-AttestationServiceInfo, Add-KeyProviderServiceInfo, Add-TrustAuthorityKeyProviderServer, Add-TrustAuthorityKeyProviderServerCertificate...}
Script 12.7.0.... VMware.VimAutomation.Srm {Connect-SrmServer, Disconnect-SrmServer}
Script 13.0.0.... VMware.VimAutomation.Storage {Add-EntityDefaultKeyProvider, Add-KeyManagementServer, Add-VsanFileServiceOvf, Add-VsanObjectToRepairQueue...}
Script 1.6.0.0 VMware.VimAutomation.StorageUtility Update-VmfsDatastore
Script 13.0.0.... VMware.VimAutomation.Vds {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch...}
Script 13.0.0.... VMware.VimAutomation.Vmc {Add-VmcSddcHost, Connect-Vmc, Disconnect-Vmc, Get-AwsAccount...}
Script 12.5.0.... VMware.VimAutomation.vROps {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-OMAlertDefinition...}
Script 12.4.0.... VMware.VimAutomation.WorkloadMan... {Disable-WMCluster, Enable-WMCluster, Get-WMCluster, Get-WMNamespace...}
Script 12.7.0.... VMware.VumAutomation {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Compliance...}

Reply
0 Kudos
LucD
Leadership
Leadership

That looks normal.

Did you stop/start your PS/PowerCLI session in the mean time?
Do you also get the same error on another station where PowerCLI is installed?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos