Unlock Package or Task Sequence Objects in SCCM/MECM

Have you ever been in the Configuration Manager Admin Console and editing a Task Sequence or opening package properties and had the console crash?

You go back in and try to pickup where you left off only to find that the object is now locked and can’t be modified?

Here’s a quick PowerShell script to unlock the object and get you back to what you were doing.

Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" #Import the ConfigurationManager.psd1 module
Set-Location "<SiteCode>:" # Set the current location to the specified site code

$CIObj = Get-CMPackage -Id "XXX0001A" - Fast # Use this for Packages
#$CIObj = Get-CMTaskSequence -TaskSequencePackageID "XXX0001B" # Use this for Task Sequences

Unlock-CMObject -InputObject $CIObj -Force

Leave a Comment