Removing DP from content location

Question
  1. Hi Leads, I am unable to remove a dp from a particular package where the remove dp option is grayed out only for single package under content location.

I have L3  access to all other packages and have remove options enabled. Am I missing something here?

solved 0
Deepu Chandru 7 months 10 Answers 143 views Beginner 0

Answers ( 10 )

  1. ROHIT : I’m unable remove it from console ( only one Package)
    Script might help me. I shall try it in a while and update you all

  2. Hi Deepu,

    Can you try to go Administration >Overview>Distribution Points> Select Your DP server.
    Now under the Properties of your DP server,Click the “Content” tab and search for that package and try to remove it from here.

  3. Deepu, let us know if this solution worked for you.

    • @Leads: I shall perform this in dev environment first and update you all by evening

    • Hi Harjit,

      The above script has ran successfully and it says Package aaa was successfully removed from WMI and content library

      but when i am running contentlibrarycleanup (whatifmode)its shows as This content library cannot be cleaned up right now because package aaa is not fully installed.

      i am removing orphaned content on all DP’s

  4. Noted and thanks.
    Changed the question title as this was picked randomly from the question itself when I left question title tab blank.

  5. First of all. Please enter the appropriate name of the question title when you ask one.

    I don’t recommend performing this action without taking backup of SCCM/ConfigMgr Or use this with your own risk.

    Run the following PS script from the post https://www.cubesys.com.au/how-to-resolve-packages-stuck-in-progress-in-sccm-distribution-points/

    All Credits to the owner of the script

    $DPName = “yourDP.yourdomain.local “
    $PkgID = “CAS018B2”

    # ======= DO NOT MODIFY THE BELOW ======= #
    $creds = Get-Credential

    #remove from wmi
    Get-WmiObject -ComputerName $DPName -Namespace RootSCCMDP -Class SMS_PackagesInContLib -Filter “PackageID = ‘$PkgID’” | Remove-WmiObject

    #remove from content library
    $ContentLib = Invoke-Command -ComputerName $DPName -Credential $creds -ScriptBlock {(Get-ItemProperty HKLM:SOFTWAREMicrosoftSMSDP).ContentLibraryPath}
    $driveletter = $ContentLib[0]
    $Location = “\” + $DPName + “$driveletter$sccmcontentlibpkglib”
    Set-Location $Location
    Remove-Item “$PkgID.INI”
    Set-Location $env:SystemDrive

    write-host “Done! $PkgID was removed from both WMI and Content Library on $DPName” -ForegroundColor Yellow

    • Hi Anoop,

      The above script has ran successfully and it says Package aaa was successfully removed from WMI and content library

      but when i am running contentlibrarycleanup (whatifmode)its shows as This content library cannot be cleaned up right now because package aaa is not fully installed.

      i am removing orphaned content on all DP’s

      Best answer

Leave an answer

Sorry, you do not have a permission to answer to this question .