Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

Howto prevent certificate error output from the commandline of a powershell script

$
0
0

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:

 

 

 

 

 

 

param(   $VIServer )

 

$user = "domain\user01"

$pass = "password"

 

  1. connect to the VC server+
+ Connect-VIServer $VIserver -username $user -password $pass  | out-null


Viewing all articles
Browse latest Browse all 176483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>