VMware Cloud Community
Shocko
Enthusiast
Enthusiast

Running automated scripts with stored credentials or integrated authentication

Hi guys, I've a bunch of scripts that I have written and wish to have them run automatically but the issue I'm facing is they all use the connect-viserver cmdlet. The scripts all run under an account that has the requisite privileges on the vCentre instances monitored. How to bypass the prompt for credentials with this cmdlet?

1 Reply
LucD
Leadership
Leadership

One option is to use the VICredentialStore, see New-VICredentialStoreItem and Get-VICredentialStoreItem

Note that you have to create the entries in there under the same account that you will use to run the automated scripts.

Andrey did a write-up on the subject in Have you seen PowerCLI’s “Credential Store” feature?


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