PowerShell script exchange
Post Reply
Knox84SysEng
Novice
Posts: 5
Liked: never
Joined: Jan 24, 2019 5:15 pm
Full Name: Lance Knox
Contact:

Change credentials of existing managed server

Post by Knox84SysEng »

OK so what I REALLY need to do is change the credentials that a existing server in backup infrastructure is using. these are windows 10 machines. I want to change the credentials on them to use our veeam service account now that the service account has been granted local admin priviledges on these windows boxes
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Change credentials of existing managed server

Post by wishr »

Hi Lance,

Could you please clarify what question do you have?

Thank you in advance!
Knox84SysEng
Novice
Posts: 5
Liked: never
Joined: Jan 24, 2019 5:15 pm
Full Name: Lance Knox
Contact:

Re: Change credentials of existing managed server

Post by Knox84SysEng »

I have 200+ servers in my backup infrastructure that have been added with one set of credentials.
I want to change those to a different set of credentials.
I don't want to do this manually. It would take hours.
I want to create a power shell script that loops through a CSV file with "store numbers"
The store number will determine the name of the managed windows server and place that into a variable like $server
then I want to change the credentials on that server to an already added credential (domain\svc.veeam)

does that make sense?
wishr
Veteran
Posts: 3077
Liked: 453 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Change credentials of existing managed server

Post by wishr »

Hi Lance,

A couple additional questions:

Are you talking about virtualization servers added to B&R as Managed Servers? Do you want to change a single set of credentials to the other one for all the 200 servers? If so, it will be easier to do that using UI and it should take approx. 83 minutes for 200 Managed Servers - just input the credentials once, then choose it from the list, repeat for each server.

BR,
Fedor
Knox84SysEng
Novice
Posts: 5
Liked: never
Joined: Jan 24, 2019 5:15 pm
Full Name: Lance Knox
Contact:

Re: Change credentials of existing managed server

Post by Knox84SysEng »

correct.
I'd prefer to not do it manually, but if I have no choice......
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Change credentials of existing managed server

Post by veremin »

Try the following example:

Code: Select all

$c = Get-VBRCredentials -Name "Name of new credentials"
$s = Get-VBRServer -Name "Name of your server"
$s.Info.SetCreds($c.Id);
$s.Update()
Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests