Hi,
I just made a couple of tests using different versions of PowerCLI and I keep getting a strange error message.
Some cmdlets will still run correctly as far as I see but some will fail.
With module 10.0.0.7895300 and 10.1.0.8403314 :
Any cmdlets will throw the error below.
Get-View : Value cannot be null.
Parameter name: format
At line:1 char:1
+ Get-View -ViewType Datacenter
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-View], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Even the "Disconnect-VIServer" will throw the same error.
With the module 6.5.4.7155375 :
Everything work as expected.
Detail of the error message :
$Error[0].Exception | fl * -Force
Message : Value cannot be null.
Parameter name: format
ParamName : format
Data : {}
InnerException :
TargetSite : System.String FormatHelper(System.IFormatProvider, System.String, System.ParamsArray)
StackTrace : at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.MessageHelper.ThrowTerminatingError(Exception ex, String connectionId)
at VMware.VimAutomation.ViCore.Util10Ps.BaseCmdlet.BaseCmdlet.ProcessRecordErrorHandled()
at VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView.ProcessRecordErrorHandled()
at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.ErrorCallbackCmdletBase.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
HelpLink :
Source : mscorlib
HResult : -2147467261
Tests done under Microsoft Windows 10 Enterprise (10.0.15063) - 1703. OS is fully patched by MS update.
Powershell version :
Name Value ---- ----- PSVersion 5.1.15063.1112 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.15063.1112 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Using the module version 10* under PowerShell v6 is ok, the cmdlets are working as expected.
Is this a known incompatibility ? I saw some comments about this error in the powershell gallery.
Thank you,
Wesley