PowerShell script exchange
Post Reply
emmoon1982
Novice
Posts: 4
Liked: never
Joined: Sep 18, 2018 10:06 am
Full Name: Ehsan M
Contact:

PowerShell script to replace the credential for list of vmware esxi that added each one in seprate vbr server

Post by emmoon1982 »

Dear All

kindly i need your support to create a PowerShell script to change the credential for list (txt file each line contain the address/hostname vbr server)of VBR server .
in fact I want to change the vm ware esxi credential that previously added by the new credential . for example "user1" with "pass1" replace with "newuser1" and "newpass1"
Thank you !
Ehsan
veremin
Product Manager
Posts: 20271
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: PowerShell script to replace the credential for list of vmware esxi that added each one in seprate vbr server

Post by veremin »

Nothing special here - use Set-VBRCredentials cmdlet with required parameters (-password, -user). Thanks.
emmoon1982
Novice
Posts: 4
Liked: never
Joined: Sep 18, 2018 10:06 am
Full Name: Ehsan M
Contact:

Re: PowerShell script to replace the credential for list of vmware esxi that added each one in seprate vbr server

Post by emmoon1982 »

so if I want to use Set-VBRCredentials cmdlet for list of server in .txt file what should I do?
also if I want to remove VBRCredential which cmdlet I should use ?
Thanks
emmoon1982
Novice
Posts: 4
Liked: never
Joined: Sep 18, 2018 10:06 am
Full Name: Ehsan M
Contact:

Re: PowerShell script to replace the credential for list of vmware esxi that added each one in seprate vbr server

Post by emmoon1982 »

I have tried " Get-VBRCredentials -name "olduser" | Remove-VBRCredentials"
and see this error: "Remove-VBRCredentials: The following credentials are in use and cannot be deleted"
but when I open veeam backup console and connect to vbr Server its possible to remove this credentials and add a new one. and if I want to add new credential and use SetVBRCredentials, the "newuser" added successfully but the job doesn't work and need to reconnect ESXi server graphically by using veeam backup console.
Thanks
emmoon1982
Novice
Posts: 4
Liked: never
Joined: Sep 18, 2018 10:06 am
Full Name: Ehsan M
Contact:

Re: PowerShell script to replace the credential for list of vmware esxi that added each one in seprate vbr server

Post by emmoon1982 »

PLZ Help Me
I have tried " Get-VBRCredentials -name "olduser" | Remove-VBRCredentials"
and see this error: "Remove-VBRCredentials: The following credentials are in use and cannot be deleted"
but when I open veeam backup console and connect to vbr Server its possible to remove this credentials and add a new one. and if I want to add new credential and use SetVBRCredentials, the "newuser" added successfully but the job doesn't work and need to reconnect ESXi server graphically by using veeam backup console.
Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests