Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, July 20, 2018 11:02 AM
Hi
As a part of SCCM content clean-up, we identified 100+ drivers can be removed from the DPs. We have around 400 DPs in our environment. Pls. let me suggest a good practice (or script) which helps to remove the unwanted drivers from the entire DPs in a single shot.
Thanks in advance!!
SHIJIN M
All replies (7)
Wednesday, August 1, 2018 10:58 AM âś…Answered
Hi
Deleting the content from console removes it from the DPs too. As per my requirement, I need to remove the packages from DPs first. Deletion can be done after the complete removal of packages from entire DPs.
Got a PS script and working well in my test environment.
$dps = Get-Content "C:\Temp\DPS.txt"
$packages= Get-Content "C:\Temp\packages.txt"
foreach ($dp in $dps)
{
foreach ($pac in $packages)
{
"Removing $pac from $dp"
Remove-CMContentDistribution -PackageId $pac -DistributionPointName $dp -force
} }
Regards
Shijin M
Friday, July 20, 2018 12:36 PM
Sorry, not sure what you want here. SImply delete the drivers from the packages in the console and then update the packages. You can also delete the driver from the console completely. There really is no other way to remove content from a DP.
Jason | https://home.configmgrftw.com | @jasonsandys
Monday, July 23, 2018 9:20 AM
Hi,
Based on my research, we find a script to remove unused drivers, the link as below.
https://gallery.technet.microsoft.com/Finding-and-Removing-d82e3266#content
Note: please kindly run this script in your lab environment first to avoid any problems.
Hope above information helps.
Best regards,
Tina Cao
============
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].
Tuesday, July 24, 2018 8:28 AM
Hi Jason
Thanks!!
Deleting the driver package from the console didn't remove the package from the DPs (sorry if I'm wrong). Actually we are doing this to gain space in DPs.
I need to remove the packages from the DPs & stop the packages from targeting the DPs again and then delete this from console. In precise the package should be removed from the "content tab of the Distribution point properties"
Regards
Shijin M
Tuesday, July 24, 2018 8:34 AM
Hi Tina
Thanks!!
I already found the packages which are to be removed. And I got a PS script to remove the drivers from DP (not yet tested). https://gallery.technet.microsoft.com/scriptcenter/Remove-Packages-from-af243f41
But the above script is meant for removing a list of packages from a single DP only. In that situation I have to run the script around 400 times. If we get a script which can be used to remove a list of drivers from a set of DPs is very useful.
Regards
Shijin M
Tuesday, July 24, 2018 9:59 AM
Hi Shijin M,
As Jason mentioned, when the source file location for a deployment is updated by adding new files or replace existing files with a newer version, you can update the content files on distribution points by using the Update Distribution Points or Update Content action:
- The content files are copied from the source file path to the content library on the site that owns the package content source
- The package version is incremented
- Each instance of the content library on site servers and on distribution points updates with only the files that have changed
Here is a link for more details.
/en-us/sccm/core/servers/deploy/configure/deploy-and-manage-content#update-content
Best regards,
Tina Cao
Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].
Tuesday, July 24, 2018 12:21 PM
Deleting a package should absolutely remove the files and package from the DPs. If this is not happening, then it's a bug although I don't think there's any evidence to support that. Keep in mind that this is not an instant action though and may take some time to complete across all of your DPs. Have you reviewed the distmgr.log when deleting a package to monitor the activity?
Jason | https://home.configmgrftw.com | @jasonsandys