Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

Add-CMUserAffinityToDevice

Updated: September 1, 2013

Applies To: System Center 2012 Configuration Manager SP1

Add-CMUserAffinityToDevice

Adds a primary user to one or more devices in the Configuration Manager hierarchy.

Syntax

Parameter Set: AddUserAffinityByDeviceName
Add-CMUserAffinityToDevice -DeviceName <String[]> [-UserId <String> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AddUserAffinityByDeviceId
Add-CMUserAffinityToDevice -DeviceId <String[]> [-UserId <String> ] [-UserName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Add-CMUserAffinityToDevice cmdlet associates the devices with a primary user in Microsoft System Center 2012 Configuration Manager. You can specify the devices to associate with the primary user by their names or IDs. You can specify the primary user by their name or ID.

User device affinity is a method of associating a user with one or more specified devices. This allows you to deploy applications to a user without the requirement to know the name of all the user's devices. Instead of deploying the application to all the user’s devices, you deploy the application to user and the application automatically installs on all devices that are associated with that user.

Parameters

-DeviceId<String[]>

Specifies an array of IDs of the devices that you want to associate with the primary user.


Aliases

ResourceId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeviceName<String[]>

Specifies an array of names of the devices that you want to associate with the primary user.


Aliases

ResourceName

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserId<String>

Specifies the ID of a user.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserName<String>

Specifies the name of the primary user.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

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: Add a primary user to a device

This command adds the primary user that has the ID 2063597981 to the device named CMCEN-DIST-02.


PS C:\> Add-CMUserAffinityToDevice -DeviceName "CMCEN-DIST-02" -UserId "2063597981"

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.