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?

Answers ( 10 )

    1
    2020-05-06T09:17:15+05:30
    0
    2020-05-06T05:02:25+05:30

    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

    0
    2020-05-06T00:16:52+05:30

    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.

    0
    2020-05-05T21:55:21+05:30

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

      0
      2020-05-06T04:59:45+05:30

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

      0
      2020-05-07T14:00:29+05:30

      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

    0
    2020-05-05T21:43:59+05:30

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

    0
    2020-05-05T21:29:55+05:30

    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 Root\SCCMDP -Class SMS_PackagesInContLib -Filter “PackageID = ‘$PkgID’” | Remove-WmiObject

    #remove from content library
    $ContentLib = Invoke-Command -ComputerName $DPName -Credential $creds -ScriptBlock {(Get-ItemProperty HKLM:SOFTWARE\Microsoft\SMS\DP).ContentLibraryPath}
    $driveletter = $ContentLib[0]
    $Location = “\\” + $DPName + “\$driveletter$\sccmcontentlib\pkglib”
    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

      0
      2020-05-07T14:01:21+05:30

      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 permission to answer to this question .