Hi Dawson,
Thanks for posting the script,
Still I am getting basic authentication error. Please find the error below.
New-CimSession : The WinRM client cannot process the request. Basic
authentication is currently disabled in the client configuration. Change the
client configuration and try the request again.
At line:1 char:12
+ $Session = New-CimSession -Authentication Basic -Credential $Credential
-Compute ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotEnabled: (:) [New-CimSession], CimException
+ FullyQualifiedErrorId : HRESULT 0x803380df,Microsoft.Management.Infrastr
ucture.CimCmdlets.NewCimSessionCommand
+ PSComputerName : ESXihost1.domain.com