Export (0) Print
Expand All



Applies to: Exchange Server 2013

This topic no longer applies to the cloud-based service. It applies only to on-premises Exchange 2013. To see the current version of the topic that applies to the cloud-based service, change the (v=exchg.150) value in the URL to (v=exchg.160).

Use the Get-SecurityPrincipal cmdlet to return a list of security principals.

For information about the parameter sets in the Syntax section below, see Syntax.

Get-SecurityPrincipal [-Identity <ExtendedSecurityPrincipalIdParameter>] [-DomainController <Fqdn>] [-Filter <String>] [-IncludeDomainLocalFrom <SmtpDomain>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <ExtendedOrganizationalUnitIdParameter>] [-ResultSize <Unlimited>] [-RoleGroupAssignable <SwitchParameter>] [-Types <MultiValuedProperty>]

This example retrieves security principals in the OU People, well-known security principals, and domain local groups from the domain

Get-SecurityPrincipal -OrganizationalUnit OU=People,DC=Contoso,DC=com -IncludeDomainLocalFrom

This example retrieves security principals from the Legal department by using the Filter parameter. Only security principals matching the filter condition are retrieved.

Get-SecurityPrincipal -Filter {Department -eq "Legal"} -IncludeDomainLocalFrom

This example retrieves a single security principal explicitly specified by using the Identity parameter.

Get-SecurityPrincipal -Identity Administrator -IncludeDomainLocalFrom

This example retrieves well-known security principals by pipelining the results from the Get-SecurityPrincipal cmdlet to the Where-Object command. The results are pipelined to the Format-Table command. Only the Name and SID parameters are selected to be included in the final output.

Get-SecurityPrincipal -IncludeDomainLocalFrom | ? {$_.Type -eq "WellKnownSecurityPrincipal"} | ft Name,SID -AutoSize
The question mark character (?) is an alias for the Where-Object command. Ft is an alias for the Format-Table command. Both aliases are included by default in the Windows PowerShell command-line interface.

Security principals are entities, such as users or security groups, which can be assigned permissions and user rights.

If the IncludeDomainLocalFrom parameter is specified along with the Filter or Identity parameters, the cmdlet doesn't return domain local security groups. This cmdlet is required for internal Exchange Administration Center functionality.

The Get-SecurityPrincipal cmdlet is used by the Exchange Administration Center in Microsoft Exchange Server 2013 to populate fields that display recipient information.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Active Directory Domain Services server settings" entry in the Exchange and Shell infrastructure permissions topic.


Parameter Required Type Description




This parameter is available only in on-premises Exchange 2013.

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.




The Filter parameter specifies one or more attributes and their corresponding values to restrict the security principals returned by the command. When the Filter parameter is used, only those security principals matching the filter conditions are returned.




The Identity parameter specifies the identity of the security principal. When the security principal is explicitly specified by using this parameter, no additional security principals are returned.




This parameter is available only in on-premises Exchange 2013.

The IncludeDomainLocalFrom parameter specifies the FQDN of an Active Directory domain. The command returns domain local groups from the specified domain.




The Organization parameter is reserved for internal Microsoft use.




The OrganizationalUnit parameter specifies an organizational unit (OU), container, or domain name. It's used to limit the results. If you use this parameter, you only get mailboxes in the OU, container, or domain that you specify, in addition to well-known security principals and domain local groups from the domain you specify in the IncludeDomainLocalFrom parameter.




The ResultSize parameter specifies the maximum number of objects to return. The default value is 1000. To return all objects that match the query, use the value unlimited.




The RoleGroupAssignable switch filters security principals and returns only those entities that can be assigned to an RBAC role group.




The Types parameter isn't available at this time.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

© 2016 Microsoft