Hi All,
I've been using the following Script in the past without any issue, untill today, I'm not able to run Invoke-VMScript.
getting the following Issue.
Invoke-VMScript: /home/jenkins/workspace/vSphere/Virtual_Machine_Creation_Content_Library/configure_ansible.ps1:14
Invoke-VMScript -VM $vm -GuestCredential $localAdminCreds -ScriptType
Invoke-VMScript SSPI is not supported on Unix OS.
Set-PowerCLIConfiguration -InvalidCertificateAction:Ignore -ParticipateInCeip $false -Confirm:$false
$vCenterCreds = Import-clixml -path /home/jenkins/workspace/imports/cred.cred
$localAdminCreds = Import-clixml -path /home/jenkins/workspace/imports/creds.cred
$vCenter = $args[0]
$virtualMachine = $args[1]
Connect-VIServer -Server $vCenter -Credential $vCenterCreds
$vm = Get-vm -name $virtualMachine
$downloadAnsibleScript = "wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible..."
$configureWinRM = "C:\Windows\Temp\ConfigureRemotingForAnsible.ps1 -EnableCredSSP -DisableBasicAuth -Verbose"
Invoke-VMScript -VM $vm -GuestCredential $localAdminCreds -ScriptType Powershell -ScriptText $downloadAnsibleScript
Invoke-VMScript -VM $vm -GuestCredential $localAdminCreds -ScriptType Powershell -ScriptText $configureWinRM
Disconnect-VIServer -Server $vCenter -Confirm:$false
This is most probably an issue with your credentials.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
yes, it appears that someone changed the Local Admin Password on the OVF Templates.