Cannot edit the object which is in use as SCCM blocks an application

You might have had this earlier: editing an application in SCCM 2012, the SCCM console crashes. And when you want to continue, you get the error: The following objects are not available and wil not be edited.

In this article, I will describe 2 solutions.

Via PowerShell

  1. The easiest way is via PowerShell. In the SCCM Console start PowerShell:

  2. Give the following command:
    Unlock-CMObject -InputObject $(Get-CMApplication -Name Microsoft_CPlusPlusRuntimes_1.0.1_ENG_WIN7_P1)
    


    There is no feedback, but you can edit the application again.

Via SQL Server Management Studio

An alternative way is via SQL Server Management Studio.

  1. Start SQL Server Management Studio
  2. Create a new query. And connect to the correct database.
  3. Give the following command:
    select * from SEDO_LockState where LockStateID<>0
    

  4. There might be multiple lines, as multiple users may have various applications locked. Find the correct one. Copy the LockstateID.
  5. Give the following command:
    DELETE from SEDO_LockState where LockID = 'Copied LockstateID'
    

  6. And you can edit your application again.