Hello Guys,
Could someone please help me with powershell script to uncheck "install backup agent automatically" in protection group.
We have many protection group we need to uncheck this before performing upgrade to UP4.
this giving me error-
$PS = Get-VBRProtectionGroup -Name za_joh_win_physical_prod
Set-VBRProtectionGroup -ProtectionGroup $PG -DeploymentOptions $False
I am still learning; Would be great if someone has it with loop?
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Feb 11, 2019 11:19 am
- Contact:
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Powershell script for protection group update
- You need to create a new protection group deployment options, using New-VBRProtectionGroupDeploymentOptions cmdlet
- While doing so, you need to set a $False value to -InstallAgent switch
- Pass new deployment options to your protection group
For instance,
Thanks!
- While doing so, you need to set a $False value to -InstallAgent switch
- Pass new deployment options to your protection group
For instance,
Code: Select all
$PG = Get-VBRProtectionGroup -Name za_joh_win_physical_prod
$DeploymentOptions = New-VBRProtectionGroupDeploymentOptions -InstallAgent:$False
Set-VBRProtectionGroup -ProtectionGroup $PG -DeploymentOptions $DeploymentOptions
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Feb 11, 2019 11:19 am
- Contact:
Re: Powershell script for protection group update
hello Thanks for that script.
Its worked perfertly fine
$PG = Get-VBRProtectionGroup -Name za_joh_win_physical_prod
$DeploymentOptions = New-VBRProtectionGroupDeploymentOptions -InstallAgent:$False
Set-VBRProtectionGroup -ProtectionGroup $PG -DeploymentOptions $DeploymentOptions
But can you share me with loop; let support I have 10 different protection group ?
abc1
abc2..
..
.
Its worked perfertly fine
$PG = Get-VBRProtectionGroup -Name za_joh_win_physical_prod
$DeploymentOptions = New-VBRProtectionGroupDeploymentOptions -InstallAgent:$False
Set-VBRProtectionGroup -ProtectionGroup $PG -DeploymentOptions $DeploymentOptions
But can you share me with loop; let support I have 10 different protection group ?
abc1
abc2..
..
.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Powershell script for protection group update
- Save all names in variable
- Go over them one by one within a loop and apply require settings
For example (don't have a console at hand, so few modifications might be needed):
By the way, let's use public forums instead of private messages, so that other users can benefit from the results of our discussion.
Thanks!
- Go over them one by one within a loop and apply require settings
For example (don't have a console at hand, so few modifications might be needed):
Code: Select all
$Names = "name1","name2", etc.
foreach ($Name in $Names)
{
$PG = Get-VBRProtectionGroup -Name $Name
$DeploymentOptions = New-VBRProtectionGroupDeploymentOptions -InstallAgent:$False
Set-VBRProtectionGroup -ProtectionGroup $PG -DeploymentOptions $DeploymentOptions
}
Thanks!
Who is online
Users browsing this forum: No registered users and 5 guests