Add User To Site

Adds a new SharePoint user account to a SharePoint site.

Automation Manager Policies that use SharePoint objects may require using PowerShell Remoting. As a result of this, if the remote computer is in a Workgroup but not connected to a Domain, the Policy will only function properly if it is run by the Administrator account of the remote computer. Attempting to run such a Policy using an account with administrative privileges but that is not the Administrator account will cause the Policy to fail.

Input Parameters

Name Type Required Description
Site URL String Yes The address of the SharePoint site to which the new user account will be added.
User Alias String Yes The name of the account to be created.
Display Name String Yes The full name of the user for whom the account is created.
Email String Yes The email address of the user account.
Group Name String Yes The SharePoint group to which the new account belongs.
Name String Yes The name of the SharePoint Administrator account to be used to create the new user account.
Password String Yes The security password of the SharePoint Administrator account to be used to create the new user account.

Output Parameters

Name Type Description
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
Site URL String Yes http://sitename/
User Alias String Yes Contoso\Jdow
Display Name String Yes Jane Dow
Email String Yes jdow@contoso.com
Group Name String Yes Contributor
Name String Yes WIN-2008R2x64\administrator
Password String Yes <link to start parameter>