Connect to VirtualCenter Server and enter credentials
Connect-VIServer -Server <Server>
Save the credentials to the credential store file (By default the credential store file is stored – encrypted – under the user profile directory)
New-VICredentialStoreItem -Host <Server> -User "<Username>" -Password "<Password>"
Via: blogs.vmware.com