Replace Owner
The following example updates the owner of an item by removing the existing security descriptor, and assigning the specified user account full control to the item and all child items.
- Connect to the configuration web service.
- Specify the unique identifier of the item for which the security descriptor is to be replaced.
- The user must be a system administrator to execute this command.
Code Sample
# Set the item identifier of the item for which the security descriptor is to be replaced.
$itemID = 37423;
# Set the name of the user or group account to take ownership of the item.
$accountName = "CENTREL-WS01\Managers";
# Replaces the ownership of the specified item.
$xia.DO_ReplaceOwnership($itemID, $accountName);