Unlock-​CM​Object

Releases locks to global objects in Configuration Manager.

Syntax

Unlock-CMObject
      [-InputObject] <IResultObject[]>
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      [-WhatIf]
      [<CommonParameters>]

Description

The Unlock-CMObject cmdlet releases locks of one or more objects in Microsoft System Center Configuration Manager. You can use the InputObject parameter to specify the input to this cmdlet, or you can pipe the input to this cmdlet. When you obtain the lock, the lock is assigned to you, your computer and the site in which the computer resides. While the lock is assigned to you, no other user or computer can edit the object until you release the lock.

Important: Configuration Manager cmdlets now automatically handle the locking and unlocking of objects. Therefore, we do not recommend you use this cmdlet to unlock objects because this may interfere with the functionality of the cmdlets.

Examples

Example 1: Unlock a global object

PS C:\> $CIObj = Get-CMDriverPackage -Id "CM100042"
PS C:\> Unlock-CMObject $CIObj

The first command gets the driver package object that has the ID CM100042, and stores the object in the $CIObj variable.

The second command releases the lock the object in $CIObj.

Required Parameters

-InputObject

Specifies an array of Configuration Manager objects output from another cmdlet.

Type:IResultObject[]
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

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

Type:SwitchParameter
Position:Named
Default value:None
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
-ForceWildcardHandling

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

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