Export (0) Print
Expand All
Expand Minimize

Grant-CsOUPermission

 

Topic Last Modified: 2013-02-22

Grants Lync Server management rights on an Active Directory organizational unit (OU). This cmdlet was introduced in Lync Server 2010.

Grant-CsOUPermission -ObjectType <User | Computer | InetOrgPerson | Contact | AppContact | Device> -OU <String> [-Confirm [<SwitchParameter>]] [-Domain <Fqdn>] [-DomainController <Fqdn>] [-Force <SwitchParameter>] [-GlobalCatalog <Fqdn>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

The command shown in Example 1 grants user management rights (-ObjectType "user") to the Redmond OU in the domain litwareinc.com.

Grant-CsOUPermission -OU "ou=Redmond,dc=litwareinc,dc=com" -ObjectType "user"

In Example 2, management rights are granted for three different objects (user, contact, inetOrgPerson) for the Redmond OU in the domain litwareinc.com.

Grant-CsOUPermission -OU "ou=Redmond,dc=litwareinc,dc=com" -ObjectType "user","contact","inetOrgPerson"

In Example 3, user management rights are simultaneously granted for three different OUs: Redmond, Dublin, and Tokyo. To carry out this task, the first command in the example creates an array variable named $x; this variable holds the distinguished names of the three Active Directory OUs where rights will be granted. In the second command, a foreach loop is created that takes each OU stored in the array and runs the Grant-CsOUPermission cmdlet against that organizational unit. In turn, that command grants user management rights for each OU in the array.

$x = "ou=Redmond,dc=litwareinc,dc=com", "ou=Dublin,dc=litwareinc,dc=com", "ou=Tokyo,dc=litwareinc,dc=com"

foreach ($i in $x) {Grant-CsOUPermission -OU $i -ObjectType "user"}

If you have locked down your Active Directory domain (that is, if you have disabled permission inheritance) then the domain preparation that takes place when you install Lync Server will not be able to add the rights needed to manage users, computers, contacts, application contacts, and InetOrg persons. (Domain administrators will still be able to manage these objects, but no one else, including members of the RTCUniversalUserAdmins group, will have management rights.) In that case, you will need to use the Grant-CsOUPermission cmdlet to give the required security groups the required rights. This must be done on a container-by-container basis.

Note that this cmdlet only grants rights to a set of predefined security groups; the cmdlet cannot be used to grant rights to arbitrary security groups or to individual users.

Rights granted by using the Grant-CsOUPermission cmdlet can later be removed by using the Revoke-CsOUPermission cmdlet. If you run that cmdlet, then the groups initially granted the OU rights will no longer have those Lync Server management rights for the specified Active Directory container. In that case, you will need to be an enterprise administrator or a domain administrator in order to manage Lync Server or one of its components.

Who can run this cmdlet: You must be a domain administrator in order to run the Grant-CsOUPermission cmdlet locally. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Grant-CsOUPermission"}

 

Parameter Required Type Description

ObjectType

Required

Microsoft.Rtc.Management.Deployment.ObjectType

Type of object covered by these rights. Valid values are:

User

Computer

Contact

AppContact

InetOrgPerson

Device (required for creating common area phones)

To assign multiple object types in the same command, separate the object types by using commas: -ObjectType "user","computer","contact". Note, however, that you can only specify a maximum of three object types per command.

OU

Required

System.String

Distinguished name of the OU where rights are to be granted. For example: -OU "ou=Redmond,dc=litwareinc,dc=com".Note that you can only grant rights to a single OU per command.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Domain

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

Name of the domain where the OU is located. If this parameter is not included, then the Grant-CsOUPermission cmdlet will look for the OU on the current domain.

DomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

Enables administrators to specify the fully qualified domain name (FQDN) of the domain controller to be used when running the Grant-CsOUPermission cmdlet. If not specified, the cmdlet will use the first available domain controller.

Force

Optional

System.Management.Automation.SwitchParameter

Suppresses the display of any non-fatal error message that might occur when running the command.

GlobalCatalog

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

FQDN of a global catalog server in your domain. This parameter is not required if you are running the Grant-CsOUPermission cmdlet on a computer with an account in your domain.

Report

Optional

System.String

Enables you to specify a file path for the log file created when the cmdlet runs. For example: -Report "C:\Logs\OUPermissions.html"

WhatIf

Optional

System.Management.Automation.SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

None. The Grant-CsOUPermission cmdlet does not accept pipelined input.

The Grant-CsOUPermission cmdlet does not return any objects or values.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft