Enable-​Msol​Device

Enables a device object in Azure Active Directory.

Syntax

Enable-MsolDevice
      -DeviceId <Guid>
      [-Force]
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]
Enable-MsolDevice
      [-Force]
      -ObjectId <Guid>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

The Enable-MsolDevice cmdlet enables a device object in Azure Active Directory.

Examples

Example 1: Enable a device using a device ID with confirmation

PS C:\>Enable-MsolDevice -DeviceId "1aa200c4-bdfb-42b5-9a1e-5f1bafbe4274"

This command enables the device with DeviceId 1aa200c4-bdfb-42b5-9a1e-5f1bafbe4274 from Azure Active Directory. This command prompts the user for confirmation.

Example 2: Enable a device using a device ID

PS C:\>Enable-MsolDevice -DeviceId "1aa200c4-bdfb-42b5-9a1e-5f1bafbe4274" -Force

This command enables the device with DeviceId 1aa200c4-bdfb-42b5-9a1e-5f1bafbe4274 from Azure Active Directory. Since the command uses the Force parameter, the user is not prompted for confirmation.

Required Parameters

-DeviceId

Specifies the device ID of the device that this cmdlet enables.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-ObjectId

Specifies the unique object ID of the device that this cmdlet enables.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the command.

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

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
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
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs