Export (0) Print
Expand All
Expand Minimize

Lock-CMObject

Updated: September 1, 2013

Applies To: System Center 2012 Configuration Manager SP1

Lock-CMObject

Locks global objects in Configuration Manager.

Syntax

Parameter Set: ByValue
Lock-CMObject [-InputObject] <IResultObject[]> [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Lock-CMObject cmdlet acquires locks of one or more objects in Microsoft System Center 2012 Configuration Manager. You can use the InputObject parameter to specify the input to this cmdlet, or you can pipe the input to this cmdlet.

Serialized Editing of Distributed Objects (SEDO) in System Center 2012 Configuration Manager provide a mechanism for assigning and unassigning locks to global System Center 2012 Configuration Manager objects in the context of a site, computer and user. When you use the Administrator Console, SEDO lock and unlock functions occur automatically. If you use Windows PowerShell cmdlets in a multiple-site environment, we recommend that you lock and unlock objects to prevent inadvertent overwriting of data. If you want to edit and save a SEDO-enabled object, you must lock the object. 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.

Parameters

-InputObject<IResultObject[]>

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


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Lock a global object

This example acquires a lock of a driver package object.

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

The second command locks the object stored in $CIObj.


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

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft