PowerShell script exchange
JasonOrchardIMNZ
Service Provider
Posts: 15 Liked: 13 times
Joined: Apr 14, 2025 12:38 am
Full Name: Jason Orchard
Contact:
Post
by JasonOrchardIMNZ » May 03, 2026 8:31 pm
this post
Bug: Add-VBRUserRoleAssignment in V13 doesn't seem to support adding domain or group.
https://helpcenter.veeam.com/docs/vbr/p ... tml?ver=13
Testing my lab I’ve found that this cmdlet, only worked when I used a “user name”, it didn’t work when I tried to add a local group/domain group.
When i treid to add a group either a local group or domain group it retuned the error message.
example command i entered
Add-VBRUserRoleAssignment -Name TESTGROUP -Role BackupOperator
error message
"Add-VBRUserRoleAssignment: Cannot find user with the specified name: TESTGROUP."
david.domask
Product Manager
Posts: 3622 Liked: 877 times
Joined: Jun 28, 2016 12:12 pm
Contact:
Post
by david.domask » May 04, 2026 10:10 am
this post
Hi Jason,
Just to confirm, does the group already exist in the Roles and Users section or you're trying to use it to add a new user with specific roles assigned?
The cmdlet is about assigning roles to Users / Groups added, though I see that it doesn't seem to find my test group either when added already, that part let me confirm on, but can you please confirm if you're trying to add a role to an existing user / group or add a new entry in the Roles / Users section.
David Domask | Product Management: Principal Analyst
JasonOrchardIMNZ
Service Provider
Posts: 15 Liked: 13 times
Joined: Apr 14, 2025 12:38 am
Full Name: Jason Orchard
Contact:
Post
by JasonOrchardIMNZ » May 04, 2026 8:35 pm
this post
Testing of add local group.
Select Veeam Backup and Replication PowerShell Toolkit
PowerShell 7.6.0
Code: Select all
A new PowerShell stable release is available: 7.6.1
Upgrade now, or check out the release page at:
https://aka.ms/PowerShell-Release?tag=v7.6.1
Welcome to the Veeam Backup and Replication PowerShell Toolkit!
To list available commands, type Get-VBRCommand
To open online documentation on all available commands, type Get-VBRToolkitDocumentation
© Veeam Software Group GmbH. All rights reserved.
PS C:\Users\Administrator> Get-VBRUserRoleAssignment
Role Type Name Id
---- ---- ---- --
BackupAdmin Group Administrators 580df2ce-6666-4750-a7b8-b3c93a77f461
BackupOperator User HV-B\Administrator e8bf9c28-3304-4ce9-99ff-4ed56fd28c66
PS C:\Users\Administrator> net localgroup testnospace
Alias name testnospace
Comment
Members
--------------------------------------------------
The command completed successfully.
PS C:\Users\Administrator> net localgroup testnospace
Alias name testnospace
Comment
Members
--------------------------------------------------
Administrator
The command completed successfully.
PS C:\Users\Administrator> Add-VBRUserRoleAssignment -Name testnospace -Role BackupOperator
Add-VBRUserRoleAssignment: Cannot find user with the specified name: testnospace.
PS C:\Users\Administrator> add-VBRUserRoleAssignment -Name hv-b\testnospace -Role BackupOperator
Add-VBRUserRoleAssignment: Cannot find user with the specified name: hv-b\testnospace.
PS C:\Users\Administrator> whoami
hv-b\administrator
JasonOrchardIMNZ
Service Provider
Posts: 15 Liked: 13 times
Joined: Apr 14, 2025 12:38 am
Full Name: Jason Orchard
Contact:
Post
by JasonOrchardIMNZ » May 04, 2026 8:59 pm
this post
note: Ive added the same group via the VBR gui and its works just fine.
Code: Select all
PS C:\Users\Administrator> Get-VBRUserRoleAssignment
Role Type Name Id
---- ---- ---- --
BackupAdmin Group BUILTIN\Administrators 580df2ce-6666-4750-a7b8-b3c93a77f461
BackupOperator User HV-B\Administrator e8bf9c28-3304-4ce9-99ff-4ed56fd28c66
BackupOperator Group HV-B\testnospace b4fe38fd-9c60-458c-86f1-2290085b158
PS C:\Users\Administrator>
david.domask
Product Manager
Posts: 3622 Liked: 877 times
Joined: Jun 28, 2016 12:12 pm
Contact:
Post
by david.domask » May 05, 2026 7:39 am
this post
Hi Jason,
Thanks for the tests, but at this stage I'm checking internally on the intended behavior here as I can reproduce the difficulties.
(P.S. Please use the code tags for your scripts and shell output, it makes it easier to read. I've edited your posts to include code tags)
David Domask | Product Management: Principal Analyst
Users browsing this forum: imaxiss and 8 guests