search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Virtual Machine Manager, Windows Powershell | No Comment | 1,766 views | 31/03/2014 17:04

You can grant a user role to a virtual machine with following command:

1
2
3
$UserRole = Get-SCUserRole -Name "Test User Role"
$VM | Set-SCVirtualMachine -Owner $UserRole.Members[0].Name -UserRole $UserRole
Grant-SCResource -Resource $VM -UserName $UserRole.Members[0].Name -UserRoleID @($UserRole.ID.Guid)

After that you will be able to reach it from System Center App Controller.