PowerShell: Removing Numerous Obsolete Packages from Distribution Points

Hey Guys - 
I've got many obsolete driver packages which were used up until last week when a new a new OSD task seqeunce was implemented rendering them no longer used.  Each of them currently exists on all 3 DPs we use and were initially distributed to each DP
individually - not using a DP Group.
To try to avoid opening the properties of each of these packages and manually removing each of the 3 DPs, I am trying to find a way to do this with PowerShell for which I've used for many other SCCM operations before.  Below is what I've tried to do
and the results I received.
Note
It is important to say that even though we are using 2012 R2, the primary still doesn't have PowerShell 3 installed.  I am using v3 on my desktop, however.  I was planning to update the primary a couple of weeks ago, but my manager (who is heavily
involved in the environement) had read about older issues when updating to WM3 and wanted me to check them out first.  I don't believe there are still any major issues, but either way - it's on PowerShell v2 which may be why my stuff isn't working.
What I've Tried
The below two things have been tried from my system using PowerShell v3 after loading the cmdlets and connecting to our SCCM server
RemovePkgfromDP.ps1 Script - I first found this script on TechNet, downloaded it, and tried running it but
couldn't figure out the exact string to use.  The Q&A has requests for exmaples, but didn't see any.  
I also believe that this is for removing DP Groups and not individual DPs.  Even though I currently have a group which includes all 3 of our DPs, I couldn't use it in the string as the package were added to individual DPs initially, right?
Remove-SCCMDPContent.ps1 Script - I tried this script also using the below string (which was taken from the script, itself as an example.)  The only variable
I wasn't 100% on was what to put for the "-ComputerName" at the end.  As our Primary is also one of our DPs, I used the same name for both.  I also tried it with and withhout FQDN
Remove-SCCMDPContent -PackageID ABC000001 -DPname OurPrimary -Computername OurPrimary
The script executed without error (or feedback) but I never saw any changes in the log files on the primary and the package wasn't ever removed from the DP
Does anyone have any suggestions, thoughts, or ideas?  Even though I'm running them from a remote instance of PowerShell v3, does it matter that the primary server is still on v2?
Thanks!
Ben K.

UPDATE
Nevermind - I'm a complete idiot.  I had the hostname of the DP wrong.  It works now.  Thanks for your help!
Good Morning - 
Thanks for the reply.  I must had missed that cmdlet when scanning the list before.  We do run 2012 R2 so I tried using it earlier this morning.  Unfortunatly, I couldn't get it to work.  
Below are example variables for my site as well as strings I tried followed by their results.  I think the biggest question for me is why I must define a collection. What am I missing?
Primary SCCM Server (Also DP): SCCMABC01.abc.org
Driver Package Name: E6410-Windows7-x64-A11
Driver Package ID I'm wanting to remove from DP: ABC0011E
Site Code: ABC
User Collection Containing All Users (Not a member of any DP Group): ABC Humans
#1 String
Remove-CMContentDistribution -PackageId ABC0011E -DistributionPointName SCCMABC01
#1 Result
Remove-CMContentDistribution : No object corresponds to the specified
parameters.At line:1 char:1
+ Remove-CMContentDistribution -PackageId ABC0011F -DistributionPointName
SCCMAB ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Confi...ributionComma
   nd:RemoveContentDistributionCommand) [Remove-CMContentDistribution], ItemN
  otFoundException
    + FullyQualifiedErrorId : ItemNotFoundException,Microsoft.ConfigurationMan
   agement.Cmdlets.Sum.Commands.RemoveContentDistributionCommand
#2 String
Remove-CMContentDistribution -DriverPackageId ABC0011F -DistributionPointName SCCMABC01
#2 Result
WARNING: No collection was specified.
#3 String
Remove-CMContentDistribution -DriverPackageId ABC0011F -DistributionPointName SCCMABC01 -CollectionName "ABC Humans"
#3 Result
There's no feedback in PowerShell as it just goes to a new prompt as if it ran correctly.  In SCCM, though, the package properties (after refreshing) still show it as on the DP.  
What am I missing?  Any suggestions? Thanks Guys!
Ben K.

Similar Messages

  • Remove package from Distribution Point

    I have been fighting with an OS deployment for the last day. The log was showing it was unable to find the package p0100001 which was my boot image. I eventually got it working as I failed to configure my boundary correctly. But it got me wondering...
    In SCCM 2007, it was pretty straight forward on how to remove packages from distribution points. But I still can't figure out how to remove a package, specifically a boot image, from a DP. I can view the distribution in the monitoring section and see the
    package successfully deployed, but what if I wanted to remove that boot image from the DP? How is this done. I'm sure it's staring me in the face, but I'm missing it. Thanks!

    I realize this is an old post, but I am dealing with the same issue regarding the removal of deployment package contents from Distribution Points.  After removing a Distribution Point from the Contents Locations tab on one of my Deployment Packages,
    how long does it take for the deployment package to be removed from the distribution point.  I have removed a large deployment package from a distribution point, but am not seeing any increase in the available free space.
    Any help would be appreciated.
    Muskie
    Muskie

  • SCCM 2012r2 - Remove "invisible" packages/applications from Distribution Point

    Hello alltogether,
    I've encountered the following issue:
    Our distribution points are displaying applications/packages as "In Progress - Waiting for Prestage content".
    These packages doesn't exist anymore. Neither as prestage file nor in the config manager itself. We never tried to apply this package by using a prestage file because such a file never existed.
    Even if I open the "content" tab of one distribution point, I can't find these packages in there.
    The exact status of this package is the following:
    Message: Distribution Content
    Message Detail: Distribution Manager instructed Package Transfer manager to send Package "x" to distribution point "y".
    Status Type: In Progress
    I want to remove these "ghost" packages from the Distribution Status overview. Anyone has a clue how to accomplish this?
    Thanks in advance!
    Best Regards
    Feyh

    Hello,
    thanks for your answer!
    Unfortunately no, there is no information about these files.
    Yesterday we installed a new one, extracted all of our prestage files on it and watched the status. The Packages weren't listed in the "Distribution Point Configuration Status".
    After some time we added the new DP to our general DP-group where all of our packages/applications are assigned to. Now the "non-existing" packages are added with the "in Progress" status.
    I had a look into "Distribution Point groups -> Our group -> properties -> content" but these packages aren't displayed in the list. Some of the packages are now in the "waiting for prestage content" state, others are staying with the "Detail will
    be available after the server finishes proccessing ...".
    We managed to remove one of the packages by deleting it from the database.
    The following statement removed it from the Distribution status overview. However, we still are able to find the package in the database.
    select  * from SMSPackageswhere PkgID = 'P100003B'
    DELETE from SMSPackages
    where PkgID = 'P100003B'
    Apparently the delete-statement affected 72 rows. But we are having no clue which. As long as we are not sure we killed anything important we are not going to do this with the other packages because it's the productive system. We can't reproduce this in our
    test system...

  • Is it Possible to remove your data package from your smartphone?

    Is it possible to remove you data package from your smartphone. It doest work well where i live, but i love my phone.

    rcschnoor wrote:
    No, you must have a data plan on Verizon if you have a smartphone.
    Actually this also applies to at&t, t-mobile and Sprint.

  • Failed to Validate Package on Distribution Point - Straight After Successful Distribution

    Hello,
    I have an updates deployment package which I have sent out to a distribution point and the status reports that the distribution was successful. If however I then do a validation of the same package, or wait for SCCM to do a validation, I get the status that
    it Failed to Validate Package on Distribution Point - the package is either missing or corrupted, please redeploy. If I then redeploy the package it once again goes fine and everything seems good but when another validation takes place I get the
    same error message again.
    The same package is fine on other distribution points and other packages are fine on the distribution point that has the issue.
    Are there are logs that will help me see why SCCM thinks the package is missing or corrupted?
    Thank you for any help.
    Kind Regards,
    Stephen

    Hello,
    Having done a bit more work on this issue I seemed to have managed to get it fixed. It turned out that the issue was due to an incorrect package ini file.
    On the distribution point there is an ini file in the SCCMContentLib/PkgLib directory that has the same name as the distribution package. That ini file is supposed to refernce all the packages that are part of the distribution package but in my
    case the ini file was no longer correct. Since the distribution package had been created and first sent out a number of the updates had expired and so should no longer be sent out to distribution points but for some reason the ini file still contained a reference
    to them so when a validation took place it was complaining that there were package files missing. Deleting the ini file and redistributing the package sorted the problem as the ini file was created once again and this time it only contains references to the
    packages that were actually sent to the distribution point.
    Many thanks for your help.

  • How long until Deleted Content from Distribution Point frees disk space?

    Hopefully this is an easy question for you guys with more experience with the product.
    Yesterday, I created a new software distribution group for Office 2013 SP1, both 32 and 64bit.   I didn't really understand at the time that it was going to download nearly 8GB into my /sources folder...which is where I save my package contents.  I
    would have not expected this download to exceed approx 2GB.
    Since I indicated that it should also be distributed to my Distribution point, which is the same server, it also increased the disk usage in the /sccmcontentlib folder, as well as increasing the amount of space used in my SQLDatabase which is on the same
    drive.  It was never deployed to anything.
    Since I'm not yet ready to deploy this update to clients, but have a few others things to do instead, I wanted to delete the content from the distribution point to free up some disk space.
    I went into Software Library, Deployment Packages, went to properties of my Office2012_SP1 deployment, went to Content Locations, picked my single distribution point from the list, and chose Remove.
    However, no disk space was cleared on my drive.   I've still got 6GB free on my 120GB volume, so I'm not out of space.    
    Is this something where a scheduled job will come through and process this removal and free up the disk space?   Or is there a way to kick of the process manually?    

    It was never setup as an application. 
    It was a Windows Update, which was added to a software update group.  Then, I went to the software update group and right clicked and chose Download.  I created a new deployment package, and then distributed the content to one of my distribution
    point.
    By doing that, I understood that it would create the D:\sources\WindowsUpdates\Office2013_SP1 folder and put the deployment files there.  And I also see that because that content was set to a distribution point, it copied it there into the ContentLib.
    So, I wanted to remove the data from ContentLib, so I went to the Deployment Package, went to Content locations and removed my Distribution Point.   
    So, are you saying that in order to remove the ContentLib, that I have to remove the entire Deployment Package?   
    I thought by removing the Content Location it would remove it from the DP, and if I later wanted to add it back ,I could go back to the Deployment Package, go into Properties and add a DP back to the content location.

  • Application won't download/install from distribution point

    Hello,
    I have a new distribution point that clients refuse to download application deployments from. The advertisement(s) get stuck at "Downloading 0%". 
    The DP monitor confirms that the package is distributed. Boundary and boundary group is created and should be OK for this DP (which has firewall disabled).
    When I take a client and put it on a different subnet, the application downloads from another working DP.
    Any suggestions?

    CAS.log --->Download started for content Content_310d8d2d-9457-455b-ac4a-1a03fb4567f3.1
    -->And it will just hang until I cancel the deployment/install on the client.
    LocationServices.log --> no errors
    Unable to retrieve AD site membership --> ????both the client and the DP are domain members
    Distribution Point='http://MNTH-SP-SRV01.xxxx.local/SMS_DP_SMSPKG$/Content_310d8d2d-9457-455b-ac4a-1a03fb4567f3.1', Locality='LOCAL', DPType='SERVER', Version='7958', Capabilities='<Capabilities SchemaVersion="1.0"><Property Name="SSLState"
    Value="0"/></Capabilities>', Signature='http://MNTH-SP-SRV01.xxxx.local/SMS_DP_SMSSIG$/Content_310d8d2d-9457-455b-ac4a-1a03fb4567f3.1.tar', ForestTrust='TRUE'
    (MNTH-SP-SRV01, this is the DP I'm trying to deploy from)
    DP is associated to a boundary group, and the boundary with the address range which the server is on is a member of the boundary group.

  • What is the process that SCCM clients access content from Distribution Points?

    I already know that the (Network Access Account) NAA is one method, and that it also has to have the
    Access this computer from the net network right configured on the Distribution Point (Default server settings allow this). I am trying to understand what happens when the connection to the Distribution Point fails when using the NAA. Does the
    client use the computer account (computername$) of the SCCM client or is the SCCM Site Server account (SCCMSiteServer$) instead. After reading
    this and
    this, I am not sure now. Hopefully someone can help clear this up. 
    --Tony

    The first link also states: When Configuration Manager tries to use the computername$
    account to download the content and it fails, it automatically tries the Network Access Account again, even if it has previously tried and failed.
    The way this reads to me is that the Network Access Account is first attempted since it is tried again after the computername$ is
    attempted. Peter, I am I just misunderstanding what it is trying to say? Also, is computername$ referring to the client machine and not
    the SCCM site server? Is the SCCM site server ever used which is referenced in Gerry's blog? 
    Just to make sure I completely understand the process goes:
    Local Computer account (ComputerName$)
    Network Access Account (NAA)
    No use of SCCM Site Server\s
    --Tony

  • SCCM 2012 client push occurs from site server or from distribution point?

    I would like to set up client push in SCCM 2012 and I have a remote site with about 80 workstations that I would like to deploy the clients to using client push, but this remote site is VERY slow, as in less than 3Mbps slow. There is a remote DP located
    at this site and I wanted to know if the remote workstations will be hammering my Site Server across the WAN (or MP I guess since the MP role is i installed on the Site Server) to request the client installation, or do the clients just request the client from
    the Site Server or MP and then the client downloads to the remote DP and then the workstations install the SCCM 2012 client from the local DP at the remote site?
    I just do NOT want the WAN link to become overwhelmed with workstation requests to install the client and have the Site Server have to respond to each and every workstation and download the SCCM 2012 client to each system over this slow WAN link. 
    How does the client push process actually work?
    Thank you

    The initial files will come from the primary site server. The rest (the biggest part) will come of the distribution point. See for a good read (even though it's more about secondary sites), this post of Jason:
    http://blog.configmgrftw.com/secondary-sites-and-boundary-groups/
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • Need a way to start the package from the point of failed record

    Hi,
    I have a package which loads billions of records, the problem i am having is when it fails after 1 billion record have to start from the beginning. Is there a way where I can start my load process from the failed record instead of starting from the beginning.
    Thanks in advance

    Simply implementing checkpoint wont restart package from the failed record onwards. It depends on how you do data transfer. For example if its a data flow task and if its an intermediate step that fails, then it wont start from failed record onwards next
    time.
    A much better option would be to implement it like this. Have a OnError event handler for the task and inside that use execute sql task to populate a control table with the max key/timestamp value of record which has been extracted. 
    Each time check if table has a entry and if present take max date/key value from it. Use the value to filter the source data to take only records with value > fetched value to start from next record onwards.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • OSD: howto force package to take sources from distribution point (not download it)?

    Hi,
    We have this package which installs correctly, but not in a task sequence. A network drive is mounted during install but we see the install fails due to the fact the package is downloaded (and share is made to c:\).
    You can enforce this behaviour in a deployment (to a collection) but howto do this in a task sequence?
    Please advise.
    Please advise.
    J.
    Jan Hoedt

    What a waste of time. So I should change every single package, application, script, bootimage of task sequence then also make a specific package for sccm 2012 client configmr just for the purpose a package installs from a distribution share instead of copying
    the files locally?!
    You're kidding right?
    Jan Hoedt

  • Problem with distribution of packages to distribution point servers

    Hi all,
    I have found problem during distribution of package to many of DP's servers in my organization. Strange is... only package generate problems - applications or updates packages are sending without any problems. 
    On System Status->Component status SMS_PACKAGE_TRANSFER_MANAGER there is:
    Message ID: 8211 "Package transfer manager failed to update the package "XXXXXX".
    I have checked PkgXferMgr.log and there is:
    ExecStaticMethod failed (80041001) SMS_DistributionPoint, FinalizeContent
    CSendFileAction::SendFiles failed; 0x80041001
    Notifying pkgXferJobMgr
     Sending failed. Failure count = 45, Restart time = 2/13/2014 1:05:14 PM Romance Standard Time
    Next I have checked smsdpprov.log on DP server and there I have found many instances of this error:
    [F38][Thu 02/13/2014 12:35:27]:CopyFileExW failed for E:\SCCMContentLib\FileLib\F6FB\F6FB39A8578F19616570D5A3DC7212C84A9DA232B30A03376BBF08F4264FEDF2 to \\?\E:\SMSPKGE$\XXXXXXXX\DE29E824-4B10-4800-A501-BC66C6EC26D3\x64\WdfCoInstaller01011.dll
    [F38][Thu 02/13/2014 12:35:27]:FileCopy failed; 0x80070020
    [F38][Thu 02/13/2014 12:35:27]:CFileLibrary::CopyFileA failed; 0x80070020
    [F38][Thu 02/13/2014 12:35:27]:CContentDefinition::CopyFileA failed; 0x80070020
    [F38][Thu 02/13/2014 12:35:27]:CContentDefinition::ExpandContentDefinitionItems failed; 0x80070020
    [F38][Thu 02/13/2014 12:35:27]:CContentDefinition::ExpandContentDefinitionItems failed; 0x80070020
    I'm going mad with this :-( Thank you for all reply.

    Try this: Powershell Script
    $SiteCode =
    "XXX"
    $PackageID = "XXX00003"
         $distpoints =
    Get-WmiObject
    -Namespace
    "root\SMS\Site_$($SiteCode)" -Query
    "Select * From SMS_DistributionPoint WHERE PackageID='$PackageID'"
            foreach
    ($dp in$distpoints)
                    $dp.RefreshNow
    =$true
                    $dp.Put()
    Thanks, Prabha G

  • Migration from Distribution Point within an SCCM2012 SP1 environment

    Hi all,
    in an exisiting SCCM2012 SP1 CU2 environment (one CAS, four Primary sites and some DPs) we have the following problem: The schedule HW for the DPs are not available and we are planing to use another HW Model for a timeframe the correct model is available.
    When the new HW model is available I'm not sure how to move or migrate the content from the exisiting DP. Do you have this already done or ideas to do this.
    Thanks for your feedback.
    regards

    Many possible ways to achieve that ... one would be: set up a temporary DP (using a temporary name). Set up the new DP once it arrived and configure it as a PullDP (so it will pull content from the temporary one). Wait until that process is finished. (Re-)configure
    the (new) PullDP so that it becomes a "classic" (non-Pull) DP. Remove the temporary one.
    Torsten Meringer | http://www.mssccmfaq.de

  • IIS uninstalled from Distribution point

    Hi All,
    I have a DP in remote site with 2 MB bandwidth. Someone uninstalled IIS from that DP. Now how can i make my DP work without sending the packages again. If i reinstall the IIS, how will the sites for DP get created again ?
    Thanks in advance.

    Don't delete the SCCMContentLib folder and it should be reused (this isn't documented anywhere but it's what I've been told should work). You could use content pre-staging and use an out of band method (like FedEx) to then ship the content if this doesn't
    work. Other than that, there's not much you can do if the DP isn't functional.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • SEP Updates from distribution points

    I'm trying to figure out the best and easiest way to leverage our DPs to updates the SEP definitions of the clients in their boundary group. Right now I have a ADR on the main site server to keep the clients up to date. I've distributed that deployment
    package to all of our DPs. My question is....When the ADR runs and adds content to the SEP definitions package, does it automatically replicate those changes to the DPs or do I have to manually update DPs with that deployment package again? If that is the
    case, is there a way for the DPs to download the definitions themselves and then use them to the update the clients at their location?

    You can't create an update package without deploying it to a DP. Of course, you need to make sure it is deployed to all appropriate DPs (ConfigMgr can't magically do that), but once you've done that (which should be done at package creation time) then yes,
    as Jeff mentioned, when the content in an update package is modified, it is automatically replicated to the content library on the site server and to any DPs it is deployed to.
    Also, I'm assuming you are talking about System Center Endpoint Protection (SCEP) correct? SEP is the commonly used acronym for Symantec Endpoint Protection, two very different things.
    Jason | http://blog.configmgrftw.com | @jasonsandys

Maybe you are looking for

  • How do you change the frame rate (or fmp) of a project once you have already started?

    I have been working on a project for a long time now, and I just reliezed that the frame rate of the project was 25 where as all my clips were in 30. Is there any possible way for me to change the frame rate even though I've already started the proje

  • Abou Receiver Mail Adapter?

    Hi All, Iam doing File to Mail Senario,where in mail i have to send an Attachement..........i have done it successfully iam geting the Attachment in Mail.........but my Client requirement is he need the Body and Attachment.......iam tring this but ia

  • Bad Connection to French Servers

    Hello, I am pretty satisfied with my BT internet normally, however, there seem to be a problem when i connect (play) on french servers, on any game. I did some tests with Windows CMD, i traced the ip. http://i.imgur.com/VNoLtPn.png I am not really go

  • Imac startup: three beeps continuously, monitor remains dark.

    imac startup: three loud beeps continuously, monitor remains dark.

  • XI to XI connection -- performance tuning possibilities

    Hi     We have two XI systems connected to each other in the following manner : R3-1 > XI1> XI2 --> R3-2 The connection uses XI Adapter - with XI1 using the path prefix /sap/xi/engine?type=entry How do we optimize / fine tune the ability of XI2 to re