Approve-CMUserDeviceAffinityRequest

Approves a request for user device affinity in Configuration Manager.

Syntax

Approve-CMUserDeviceAffinityRequest
       -CollectionName <String>
       [-DeviceId <String>]
       [-DeviceName <String>]
       [-UserDeviceAffinityRequest <IResultObject>]
       [-UserDeviceAffinityRequestId <String>]
       [-UserId <String>]
       [-UserName <String>]
       [-DisableWildcardHandling]
       [-ForceWildcardHandling]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Approve-CMUserDeviceAffinityRequest
       -CollectionId <String>
       [-DeviceId <String>]
       [-DeviceName <String>]
       [-UserDeviceAffinityRequest <IResultObject>]
       [-UserDeviceAffinityRequestId <String>]
       [-UserId <String>]
       [-UserName <String>]
       [-DisableWildcardHandling]
       [-ForceWildcardHandling]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Approve-CMUserDeviceAffinityRequest cmdlet approves a request for user device affinity.

In Configuration Manager, user device affinity defines a relationship between a user and a device. Instead of deploying an application to a group of devices, you deploy an application to a user and Configuration Manager installs the application on all devices associated with the user.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Approve a request for user device affinity

PS XYZ:\>Approve-CMUserDeviceAffinityRequest -CollectionName "All Systems" -UserName "Western\EvanNarvaez$"

This command approves a request for user device affinity for the collection named All Systems.

Parameters

-CollectionId

Specifies a collection ID that represents the user device affinity in Configuration Manager.

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

-CollectionName

Specifies a name of a collection that represents the user device affinity in Configuration Manager.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DeviceId

Specifies a device ID in Configuration Manager.

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

-DeviceName

Specifies a device name in Configuration Manager.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-UserDeviceAffinityRequest

Specifies a CMUserDeviceAffinityRequest object. To obtain a CMUserDeviceAffinityRequest object, use the Get-CMUserDeviceAffinityRequest cmdlet.

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

-UserDeviceAffinityRequestId

Specifies a unique ID for a request for user device affinity.

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

-UserId

Specifies a Configuration Manager ID for a user resource.

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

-UserName

Specifies a user name for a resource in Configuration Manager.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object