-
- Novice
- Posts: 3
- Liked: never
- Joined: Mar 04, 2025 4:41 am
- Full Name: Woo, Sujeong
- Contact:
Case # 07614951 Difference in Workflow Between GUI and PowerShell Commands
Hi,
I am currently working on converting an existing operational procedure, which has been performed via the GUI, into Veeam command-based automation. While doing so, I encountered a question regarding protection groups.
In the GUI, I can create a backup job under the "Manually Added" protection group without setting up a protection group beforehand. However, when using commands, it seems that creating a protection group first is required. I would like to understand why this difference exists.(command Add-VBRComputerBackupJob)
I understand that you would like to know why there is a difference in the workflow when using the GUI and PowerShell commands.
I am currently working on converting an existing operational procedure, which has been performed via the GUI, into Veeam command-based automation. While doing so, I encountered a question regarding protection groups.
In the GUI, I can create a backup job under the "Manually Added" protection group without setting up a protection group beforehand. However, when using commands, it seems that creating a protection group first is required. I would like to understand why this difference exists.(command Add-VBRComputerBackupJob)
I understand that you would like to know why there is a difference in the workflow when using the GUI and PowerShell commands.
-
- Veeam Software
- Posts: 2838
- Liked: 650 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Case # 07614951 Difference in Workflow Between GUI and PowerShell Commands
Hi sujeong, welcome to the forums.
Manually added Protection Group is mostly meant for "one-off" backups or ad-hoc backups of machines that don't quite need a protection group. Having protection groups allow for automated management of the deployed agent for example or a way of easily querying and managing the machines you need to protect.
Can I ask, what is the workflow that requires machines added to the Manually Added group in an automated way? Manually Added machines have some limitations and in general for proper protection, you'll want to use protection groups anyways.
Manually added Protection Group is mostly meant for "one-off" backups or ad-hoc backups of machines that don't quite need a protection group. Having protection groups allow for automated management of the deployed agent for example or a way of easily querying and managing the machines you need to protect.
Can I ask, what is the workflow that requires machines added to the Manually Added group in an automated way? Manually Added machines have some limitations and in general for proper protection, you'll want to use protection groups anyways.
David Domask | Product Management: Principal Analyst
-
- Novice
- Posts: 3
- Liked: never
- Joined: Mar 04, 2025 4:41 am
- Full Name: Woo, Sujeong
- Contact:
Re: Case # 07614951 Difference in Workflow Between GUI and PowerShell Commands
Hi David,
Thank you for your response. I understand the "Manually Added" details.
Currently, the requirement is to create one job per server.
Would it be possible to meet this requirement while specifying a single protection group as a replacement for the "Manually Added" protection group?
We would like to avoid creating too many protection groups if possible.
Thank you for your response. I understand the "Manually Added" details.
Currently, the requirement is to create one job per server.
Would it be possible to meet this requirement while specifying a single protection group as a replacement for the "Manually Added" protection group?
We would like to avoid creating too many protection groups if possible.
-
- Veeam Software
- Posts: 2838
- Liked: 650 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Case # 07614951 Difference in Workflow Between GUI and PowerShell Commands
Hi sujeong,
You're very welcome. You can pass an entity from Get-VBRDiscoveredComputer to Add-VBRComputerBackupJob on the -BackupObject parameter. So add the computers to a proper protection group or groups that make sense for your organization, and then you can add the computers to individual jobs as you see fit.
Quick example workflow:
You're very welcome. You can pass an entity from Get-VBRDiscoveredComputer to Add-VBRComputerBackupJob on the -BackupObject parameter. So add the computers to a proper protection group or groups that make sense for your organization, and then you can add the computers to individual jobs as you see fit.
Quick example workflow:
Code: Select all
$repo = Get-VBRBackupRepository -Name 'some-repo'
$disc = Get-VBRDiscoveredComputer
$disc[0]
State : Offline
AgentStatus : Installed
AgentVersion : 6.3.0.177
DriverStatus : NotInstalled
...#Truncated for readability
OperatingSystem : Windows11
OperatingSystemPlatform : X64
OperatingSystemVersion : 10.0.22000
...#Truncated for readability
Type : Computer
ParentId : 9af1713b-47fc-49ac-91d6-f09196ef9f97
ProtectionGroupId : b4b6d7bb-0201-4624-a08e-de3b23af7cf8
Name : 172.21.241.210
Id : 1159c904-f21a-42a5-a651-f338434ea9f3
Add-VBRComputerBackupJob -OSPlatform Windows -Type Server -Mode ManagedByBackupServer -Name "dd-p
s-vaw-test" -BackupObject $disc[0] -BackupType EntireComputer -BackupRepository $repo
Id : 7ac6654f-4dba-4fdc-8f84-d10a24e2b87f
Name : dd-ps-vaw-test
Description : Created by Powershell at 06.03.2025 09:40:48.
OSPlatform : Windows
...#Truncated for readability
David Domask | Product Management: Principal Analyst
-
- Novice
- Posts: 3
- Liked: never
- Joined: Mar 04, 2025 4:41 am
- Full Name: Woo, Sujeong
- Contact:
Re: Case # 07614951 Difference in Workflow Between GUI and PowerShell Commands
Hi David,
Thank you very much. I understand everything so far.
I just have one final question:
Does the Name property of Get-VBRDiscoveredComputer represent the hostname or the VM name?
In my script, I am currently assuming that it represents the hostname, but I would like to confirm if this is correct.
Below is the script I am using:
$HOST_NAME = "aaa"
# Retrieve the list of registered computers
$discoveredComputers = Get-VBRDiscoveredComputer
foreach ($computer in $discoveredComputers) {
Write-Host "Name: $($computer.Name), OS: $($computer.OperatingSystem)"
}
# Search for the backup target computer by hostname
$BackupObject = $discoveredComputers | Where-Object { $_.Name -eq $HOST_NAME }
Thank you very much. I understand everything so far.
I just have one final question:
Does the Name property of Get-VBRDiscoveredComputer represent the hostname or the VM name?
In my script, I am currently assuming that it represents the hostname, but I would like to confirm if this is correct.
Below is the script I am using:
$HOST_NAME = "aaa"
# Retrieve the list of registered computers
$discoveredComputers = Get-VBRDiscoveredComputer
foreach ($computer in $discoveredComputers) {
Write-Host "Name: $($computer.Name), OS: $($computer.OperatingSystem)"
}
# Search for the backup target computer by hostname
$BackupObject = $discoveredComputers | Where-Object { $_.Name -eq $HOST_NAME }
-
- Veeam Software
- Posts: 2838
- Liked: 650 times
- Joined: Jun 28, 2016 12:12 pm
- Contact:
Re: Case # 07614951 Difference in Workflow Between GUI and PowerShell Commands
Hi sujeong,
you're very welcome, I'm glad I could assist.
The Name property will represent the FQDN/Hostname/IP used to add the machine. You need to prepare in your scrip that name may be an IPv4 address or FQDN, but this will depend on how you add the machines, so it will be consistent.
you're very welcome, I'm glad I could assist.
The Name property will represent the FQDN/Hostname/IP used to add the machine. You need to prepare in your scrip that name may be an IPv4 address or FQDN, but this will depend on how you add the machines, so it will be consistent.
David Domask | Product Management: Principal Analyst
Who is online
Users browsing this forum: No registered users and 1 guest