Export (0) Print
Expand All
Expand Minimize

Get-CMUserDeviceAffinity

Updated: September 1, 2013

Applies To: System Center 2012 Configuration Manager SP1

Get-CMUserDeviceAffinity

Gets user device affinities.

Syntax

Parameter Set: SearchByDeviceIdMandatory
Get-CMUserDeviceAffinity -DeviceId <String[]> [ <CommonParameters>]

Parameter Set: SearchByDeviceNameMandatory
Get-CMUserDeviceAffinity -DeviceName <String[]> [ <CommonParameters>]

Parameter Set: SearchByUserIdMandatory
Get-CMUserDeviceAffinity -UserId <String[]> [ <CommonParameters>]

Parameter Set: SearchByUserNameMandatory
Get-CMUserDeviceAffinity -UserName <String[]> [ <CommonParameters>]




Detailed Description

The Get-CMUserDeviceAffinity cmdlet gets one or more user device affinities. User device affinity in Microsoft System Center 2012 Configuration Manager is a method of associating a user with one or more specified devices.

Parameters

-DeviceId<String[]>

Specifies an array of device IDs.


Aliases

ResourceId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceName<String[]>

Specifies an array of device names.


Aliases

ResourceName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserId<String[]>

Specifies the ID of the primary user of the devices.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserName<String[]>

Specifies the name of the primary user of the devices.


Aliases

UniqueUserName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get a user device affinity by using a user name

This command gets the user device affinity for the user named CENTRAL\001D$.


PS C:\> Get-CMUserDeviceAffinity -UserName "CENTRAL\001D$"

Example 2: Get a user device affinity by using a user ID

This command gets the user device affinity for the user that has the ID named 2063597981.


PS C:\> Get-CMUserDeviceAffinity -UserID "2063597981"

Example 3: Get a user device affinity by using a device name

This command gets the user device affinity for the device named CMCEN-DIST02


PS C:\> Get-CMUserDeviceAffinity -DeviceName "CMCEN-DIST02"

Example 4: Get a user device affinity by using a device ID

This command gets the user device affinity for the device that has the ID named 2063597981.


PS C:\> Get-CMUserDeviceAffinity -DeviceID "2097152000"

Related topics

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