What is a good way to hide IPs / credentials when using scripts to log into vCenter and accomplish automated tasks? For example, I have to use the following to connect:
Connect-VIServer 192.168.10.10 -user Administrator@vsphere.local -password MYpassword
Is there a better way to hide this by doing something like pulling it from a txt with locked permissions?
There are a number of techniques described in the 2-part series, starting with Secure Password with PowerShell: Encrypting Credentials – Part 1
PowerCLI has it's own implementation of storing credentials (with the servername as a key), see New-VICredentialStoreItem
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
For the credentials, you may want to take a look at e.g. https://www.vmware.com/support/developer/windowstoolkit/wintk40u1/html/New-VICredentialStoreItem.htm...
André
There are a number of techniques described in the 2-part series, starting with Secure Password with PowerShell: Encrypting Credentials – Part 1
PowerCLI has it's own implementation of storing credentials (with the servername as a key), see New-VICredentialStoreItem
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference