Get-CsOnlineUser

 

上次修改主題的時間:2017-03-29

Returns information about users who have accounts homed on 商務用 Skype Online. This cmdlet can only be used with 商務用 Skype Online.

Get-CsOnlineUser [-Identity <UserIdParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-LdapFilter <String>] [-OnModernServer <SwitchParameter>] [-OnOfficeCommunicationServer <SwitchParameter>] [-OU <OUIdParameter>] [-ResultSize <Unlimited>] [-SkipUserPolicies <SwitchParameter>] [-UnassignedUser <SwitchParameter>]

The command shown in Example 1 returns information for all the users configured as online users.

Get-CsOnlineUser

In Example 2 information is returned for a single online user: the user with the SIP address "sip:kenmyer@litwareinc.com".

Get-CsOnlineUser -Identity "sip:kenmyer@litwareinc.com"

Example 3 uses the Filter parameter to limit the returned data to online users who have been assigned the per-user archiving policy RedmondArchiving. To do this, the filter value {ArchivingPolicy -eq "RedmondArchiving"} is employed; that syntax limits returned data to users where the ArchivingPolicy property is equal to (-eq) "RedmondArchiving".

Get-CsOnlineUser -Filter {ArchivingPolicy -eq "RedmondArchiving"}

Example 4 returns information only for user accounts that have been configured so that the account does not appear in Microsoft Exchange address lists. (That is, the Active Directory attribute msExchHideFromAddressLists is True.) To carry out this task, the Filter parameter is included along with the filter value {HideFromAddressLists -eq $True}.

Get-CsOnlineUser -Filter {HideFromAddressLists -eq $True}

The command shown in Example 5 returns information for all the online users assigned to the tenant with the TenantID "bf19b7db-6960-41e5-a139-2aa373474354". To accomplish the task, the command includes the Filter parameter along with the filter value {TenantId –eq "bf19b7db-6960-41e5-a139-2aa373474354"}. This filter limits the returned data to online users assigned to the tenant "bf19b7db-6960-41e5-a139-2aa373474354".

Get-CsOnlineUser -Filter {TenantId -eq "bf19b7db-6960-41e5-a139-2aa373474354"}

The Get-CsOnlineUser cmdlet returns information about users who have accounts homed on 商務用 Skype Online. The returned information includes standard Active Directory account information (such as the department the user works in, his or her address and phone number, etc.) as well as 商務用 Skype Server 2015 specific information: the Get-CsOnlineUser cmdlet returns information about such things as whether or not the user has been enabled for Enterprise Voice and which per-user policies (if any) have been assigned to the user.

Note that the Get-CsOnlineUser cmdlet does not have a TenantId parameter; that means you cannot use a command similar to this in order to limit the returned data to users who have accounts with a specific 商務用 Skype Online tenant:

Get-CsOnlineUser -TenantId "bf19b7db-6960-41e5-a139-2aa373474354"

However, if you have multiple you can return users from a specified tenant by using the Filter parameter and a command similar to this:

Get-CsOnlineUser -Filter {TenantId -eq "bf19b7db-6960-41e5-a139-2aa373474354"}

That command will limit the returned data to user accounts belong to the tenant with the TenantId "bf19b7db-6960-41e5-a139-2aa373474354". If you do not know your tenant IDs you can return that information by using this command:

Get-CsTenant

If you have a hybrid or "split domain" deployment (that is, a deployment in which some users have accounts homed on 商務用 Skype Online while other users have accounts homed on an on-premises version of 商務用 Skype Server 2015) keep in mind that the Get-CsOnlineUser cmdlet only returns information for 商務用 Skype Online users. However, the Get-CSUser cmdlet will return information for both online users and on-premises users. If you want to exclude 商務用 Skype Online users from the data returned by the Get-CsUser cmdlet, use the following command:

Get-CsUser -Filter {TenantId -eq "00000000-0000-0000-0000-000000000000"}

By definition, users homed on the on-premises version will always have a TenantId equal to 00000000-0000-0000-0000-000000000000. Users homed on 商務用 Skype Online will a TenantId that is equal to some value other than 00000000-0000-0000-0000-000000000000.

 

Parameter Required Type Description

Credential

Optional

System.Management.Automation.PSCredential

This parameter is not used with 商務用 Skype Online.

DomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

This parameter is not used with 商務用 Skype Online.

Filter

Optional

System.String

Enables you to limit the returned data by filtering on 商務用 Skype Server 2015 specific attributes. For example, you can limit returned data to users who have been assigned a specific voice policy, or users who have not been assigned a specific voice policy.

The Filter parameter uses the same filtering syntax that is used by the Where-Object cmdlet. For example, a filter that returns only users who have been enabled for Enterprise Voice would look like this, with EnterpriseVoiceEnabled representing the Active Directory attribute, -eq representing the comparison operator (equal to), and $True (a built-in Windows PowerShell variable) representing the filter value:

{EnterpriseVoiceEnabled -eq $True}

Identity

Optional

Microsoft.Rtc.Management.AD.UserIdParameter

Indicates the Identity of the user account to be retrieved. User Identities can be specified using one of the following formats: 1) the user's SIP address; 2) the user's user principal name (UPN); or, 3) the user's Active Directory display name (for example, Ken Myer).

You can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" returns all the users who have a display name that ends with the string value " Smith".

LdapFilter

Optional

System.String

Enables you to limit the returned data by filtering on generic Active Directory attributes (that is, attributes that are not specific to 商務用 Skype Server 2015). For example, you can limit returned data to users who work in a specific department, or users who have a specified manager or job title.

The LdapFilter parameter uses the LDAP query language when creating filters. For example, a filter that returns only users who work in the city of Redmond would look like this: "l=Redmond", with "l" (a lowercase L) representing the Active Directory attribute (locality); "=" representing the comparison operator (equal to); and "Redmond" representing the filter value.

OnModernServer

Optional

System.Management.Automation.SwitchParameter

When present, the cmdlet returns a collection of users homed on 商務用 Skype Server 2015 or later. Users with accounts on previous versions of the software will not be returned when you use this parameter.

OnOfficeCommunicationServer

Optional

System.Management.Automation.SwitchParameter

This parameter is not used with 商務用 Skype Online.

OU

Optional

Microsoft.Rtc.Management.AD.OUIdParameter

This parameter is not used with 商務用 Skype Online.

ResultSize

Optional

Microsoft.Rtc.Management.ADConnect.Core.Unlimited

Enables you to limit the number of records returned by the cmdlet. For example, to return seven users (regardless of the number of users that are in your forest) include the ResultSize parameter and set the parameter value to 7. Note that there is no way to guarantee which seven users will be returned.

The result size can be set to any whole number between 0 and 2147483647, inclusive. If set to 0 the command will run, but no data will be returned. If you set the ResultSize to 7 but you have only three users in your forest, the command will return those three users, and then complete without error.

SkipUserPolicies

Optional

System.Management.Automation.SwitchParameter

PARAMVALUE: SwitchParameter

UnassignedUser

Optional

System.Management.Automation.SwitchParameter

Enables you to return a collection of all the users who have been enabled for 商務用 Skype Online but are not currently assigned to a Registrar pool. Users are not allowed to log on to unless they are assigned to a Registrar pool.

The Get-CsOnlineUser cmdlet accepts pipelined instances of the Microsoft.Rtc.Management.ADConnect.Schema.OCSADUser object, as well as string values that represent a valid user account Identity (for example, "sip:kenmyer@litwareinc.com").

The Get-CsOnlineUser cmdlet returns instances of the Microsoft.Rtc.Management.ADConnect.Schema.ADOCOnlineUser object.

 
顯示: