Following are the PowerShell cmdlet parameters and xml syntax for the ControlPoint Set User Direct Permissions action.
PowerShell Parameters
|
Parameter |
Description |
|---|---|
|
Set-UserDirectPermissions |
The cmdlet name |
|
-Type |
The level of the hierarchy for the SharePoint object(s) that will be acted on. Valid values are: §FARM §WAP §SITE §WEB §LIST |
|
-Url |
The url of the SharePoint object to act on. NOTE: If the action is to be performed on a farm, Web application, or site collection, you can use the url for any site within that scope. |
|
-IncludeChildren |
An indication of whether you want the action to include child objects.
§If -Type is FARM, WAP, or SITE, $true is the only valid value. §If -Type is WEB, valid values are $true or $false.
NOTE: If this parameter is omitted: §for FARM, WAP, or SITE, a value of true will be assumed §for WEB or LIST, a value of false will be assumed. |
|
-UserLoginNames |
Login name(s) of the user(s) whose permissions will be set. Enter multiple login names as a comma-separated list. |
|
-PermissionsLevel |
The permissions level to set for the user(s). NOTE: You can specify a custom permissions level as long as it has already been defined for the site collection. |
|
-TaskAuditPath (Optional) |
If you want to save a ControlPoint Task Audit for the action as a .pdf file, the path to the directory where you want the file to be saved. |
Example PowerShell Cmdlet with Parameters
Set-UserDirectPermissions -url http://QuestTest/alpha -type SITE -UserLoginNames QuestTest\jamesjoyce,QuestTest\marktwain -PermissionsLevel Design -IncludeChildren $true -TaskAuditPath C:\temp\TaskAudits
xml Tags
REMINDER: Xml templates for ControlPoint actions are located in the C:\Program Files\Metalogix\ControlPoint\Support\Powershell.
|
Tags |
Description |
|---|---|
|
<SetUserDirectPermissionsContract...> |
The action to be performed |
|
<SharePointObjects> |
The container for all of the objects that you want to include in the operation. |
|
<SharePointObject> |
The container for the current object. |
|
<SPHierarchyLevel> |
The level of the hierarchy for the SharePoint object(s) that will be acted on. Possible values are: §FARM §WAP §SITE §WEB §LIST NOTE: If the action is to be performed on a farm, Web application, or site collection, you can use the url for any site within that scope. |
|
<Url> |
The url of the SharePoint object to act on. |
|
<UserLoginNames> <string> |
Login name(s) of the user(s) whose permissions will be set. Enter each login name as a separate string. |
|
<PermissionsType> |
The permissions level to set for the user(s). NOTE: You can specify a custom permissions level as long as it has already been defined for the site collection. |
|
<IncludeChildren> |
An indication of whether you want the action to include child objects.
§If SPHierarchyLevel=FARM, WAP, or SITE, true is the only valid value. §If SPHierarchyLevel=WEB or LIST, valid values are true or false. |
|
<TaskAuditPath> (Optional) |
If you want to generate a ControlPoint Task Audit (as a .pdf file) for the action, the path to the directory where you want the file to be saved |
Example xml File Contents
Example PowerShell Command to Run
Set-UserDirectPermissions -FilePath C:\xml\SetUserDirectPermissions.xml