Powershell Script for Driver Cleanup in MECM 2211?

Justin Olson 0 Reputation points
2023-03-30T16:15:06.79+00:00

Hello,

I'm looking for a powershell script that can look for Driver Associations and if there are none, delete from Configuration Manager. I'm struggling to sort out the best way to do this. Does anyone have something they use to cleanup the Driver repository without doing it manually?

Microsoft Configuration Manager
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CherryZhang-MSFT 6,481 Reputation points
    2023-03-31T05:55:19.69+00:00

    Hi @Justin Olson

    The following ways for your reference:

    1, Remove-CMDriver: The Remove-CMDriver cmdlet removes a device driver from the Driver Catalog. The source is not affected.

    2, Remove-CMDriverPackage: The Remove-CMDriverPackage cmdlet remove a driver package. After you remove the driver package, you can't use it in a task sequence.

    3, Remove-CMDriverFromDriverPackage: The Remove-CMDriverFromDriverPackage cmdlet removes a driver from a driver package in Configuration Manager. When you remove a driver from a driver package, the device driver content is deleted from the source directory share for the driver package.

    More information please refer to the related links.

    Looking forward to your feedback.

    Best regards,
    Cherry


     

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.