Remove-CMDeviceAffinityFromUser

SYNOPSIS

Removes device affinity from a Configuration Manager user.

SYNTAX

RemoveDeviceAffinityByUserName (Default)

Remove-CMDeviceAffinityFromUser -UserName <String[]> [-DeviceId <String>] [-DeviceName <String>] [-Force]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

RemoveDeviceAffinityByUserId

Remove-CMDeviceAffinityFromUser -UserId <String> [-DeviceId <String>] [-DeviceName <String>] [-Force]
 [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Remove-CMDeviceAffinityFromUser cmdlet removes device affinity from a user of Microsoft System Center Configuration Manager.

Device affinity in Configuration Manager associates a user with one or more devices. Instead of deploying applications to all the devices of a user, you deploy the application to the user and Configuration Manager automatically installs the application on all devices that are associated with that user. Device affinity removes the need for Configuration Manager to determine the names of all the devices of a user before you deploy applications for that user.

For more information about user device affinity, see How to Manage User Device Affinity in Configuration Manager on TechNet.

EXAMPLES

Example 1: Remove device affinity from a user by user ID

PS C:\> Remove-CMDeviceAffinityFromUser -UserName "Patti Fuller" -DeviceName "WestDivUpdates05"

This command adds affinity to the device named WestDivUpdates05 for the user named Patti Fuller.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DeviceId

Specifies a device by using an ID.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DeviceName

Specifies a device by using a name.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserId

Specifies a user by using an ID.

Type: String
Parameter Sets: RemoveDeviceAffinityByUserId
Aliases: 

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserName

Specifies an array of user names.

Type: String[]
Parameter Sets: RemoveDeviceAffinityByUserName
Aliases: UniqueUserName

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Add-CMDeviceAffinityToUser

Approve-CMUserDeviceAffinityRequest

Deny-CMUserDeviceAffinityRequest

Get-CMUserDeviceAffinity

Get-CMUserDeviceAffinityRequest

Import-CMUserDeviceAffinity