#vcconnect.ps1
Get-VICredentialStoreItem -File C:\Users\*******\AppData\Roaming\VMware\credstore\vicredentials.xml | %{
Connect-VIServer -Server $_.host -User $_.User -Password $_.Password
}
#Successful run within PS...
PS D:\ECE\vCenter\tested> .\vcconnect.ps1
Name Port User
---- ---- ----
xxx.xxx.xxx.xxx 443 *****\******
xxx.xxx.xxx.xxx 443 *****\******
#Fail from AzureDevOps...
2020-08-13T02:39:37.2754305Z + CategoryInfo : WriteError: (:) [Get-VICredentialStoreItem], ParentContainsErrorRecordException
2020-08-13T02:39:37.2754933Z + FullyQualifiedErrorId : ParameterBindingFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVICredentialStore
2020-08-13T02:39:37.2755213Z Item
2020-08-13T02:39:37.2755320Z
2020-08-13T02:39:37.3521447Z ##[error]PowerShell exited with code '1'.