Entitling or unentitling an individual desktop
Entitling an individual desktop is similar to entitling a desktop pool, except that, in this case, we need both the user SID as well as the machine ID.
How to do it…
For the following example command, we will nest two commands, Get-DesktopVM
and Get-User
, within the UserOwnership
command:
Update-UserOwnership -Machine_id (Get-DesktopVM -Name "ViewLC0001").machine_id -Sid (Get-User -Name "Jason Ventresco").sid
Note
The Get-User
command accepts wildcards, but be careful while using them, as the wrong user might be returned. If in doubt, use the Get-User
command by itself to verify that you are selecting the correct user.
The Remove-UserOwnership
command requires only the desktop machine ID:
Remove-UserOwnership -Machine_id (Get-DesktopVM -Name "ViewLC0001").machine_id