I need to fetch the VM details using gMSA account
$Username = 'domain\gMSA-Auto$'
Connect-VIServer -server 192.xxx.xxx.xxx -User $Username
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Set-PowerCLIConfiguration -WebOperationTimeoutSeconds -1 -Scope Session -Confirm:$false
Get-VM
I used gMSA to schedule scripts but don't have idea how to use it here.
Please if anyone can help me with it