When I run a powershell script directly from MSDOS that automaticaly logs in I get the following output:
There were one or more problems with the server certificate:
..
* A certification chain processed correctly, but terminated in a root certificat
e which isn't trusted by the trust provider.
...
I don't need this. What to do to prevent this?
MSDOS commandline:
> PowerShell -PSConsoleFile "C:\Progra~1\VMware\Infrastructure\VIToolkitForWindows\vim.psc1" -command c:\vmware_vmfs_status.ps1 servername
This is the start of my powershell script:
$user = "domain\user01"
$pass = "password"
+
Connect-VIServer $VIserver -username $user -password $pass | out-null