Επεξεργασία

Κοινή χρήση μέσω


Disable-MsolDevice

Disables a device object in Azure Active Directory.

Syntax

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

Description

The Disable-MsolDevice cmdlet disables a device object in Azure Active Directory.

Examples

Example 1: Disable a device with confirmation

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

This command disables the device with DeviceId 1aa200c4-bdfb-42b5-9a1e-5f1bafbe4274 from Microsoft Azure Active Directory. The command will prompt the user for confirmation.

Example 2: Disable a device

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

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

Parameters

-Confirm

Prompts you for confirmation before running the command.

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

-DeviceId

Specifies the unique device ID of the device that this cmdlet disables.

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

-Force

Forces the command to run without asking for user confirmation.

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

-ObjectId

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

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False