VMware Cloud Community
philipbbeadman
Contributor
Contributor

Cannot complete login due to an incorrect user name or password - powershell plugin

So I have created a workflow to call an external powershell script on a powershell host. When I run the script manually it works just fine, but when I run it via Orchestrator I get this error:

Connect-VIServer  Cannot complete login due to an incorrect user name or password

This makes no sense to me, the Connect-VIServer command is embedded in the powershell script and works when I run the PS1 file directly. Any help would be appreciated.

0 Kudos
3 Replies
Burke-
VMware Employee
VMware Employee

Disclaimer - I don't spend ANY TIME working with this plug-in, especially actually trying to call things remotely...

Question: Are you using a vCO Appliance? If so, did you configure it to use Kerberos authentication? I seem to remember seeing somewhere that this may be required in order to login to the server hosting PowerShell ... I could be way off base, but just throwing out an idea ...

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
StefanPahrmann

You are probably suffering the same thing as I do. With your powershell connection (probably Kerberos) you have access to the powershell host only. Any requests to other hosts are not forwarded with your credentials.
I haven't figured out how to enabling delegation effectively yet.

So maybe some explicit credentials with something like this will work (called credential store):

(Get-Credential).Password | ConvertFrom-SecureString | Out-File -FilePath C:\temp\me.cred

$vicred = New-Object System.Management.Automation.PsCredential "root", (Get-Content "C:\temp\me.cred" | ConvertTo-SecureString)

connect-viserver vcenter -credential $vicred

Isn't there some native workflow which cloud do the work?

-Stefan

philipbbeadman
Contributor
Contributor

Turns out I was running the wrong powershell script :smileyblush:, thanks for the responses though.

0 Kudos