Life of a techno-guru
Tuesday, July 08, 2008
  Deleting Disabled Configuration Manager Drivers
Hey guys, I thought I'd share a quick script I wrote to delete drivers that I had disabled in the System Center Configuration Manager 2007 (ConfigMgr) console. See, you can disable multiple drivers through the ConfigMgr console, but you can't delete multiple driver ojects, which is pretty frustrating, if you ask me. Simply update the "xxx" with your site code, and execute the script on your SCCM site server!

namespace = "root\cimv2\site_xxx"
qry = "select * from sms_driver where IsEnabled = 'false'"
set sms = GetObject("winmgmts:" & namespace)
set drivers = sms.ExecQuery(qry)

for each driver in drivers
call driver.Delete_()
next


I hope this helps!
 
Comments:
Hi,

I think the namespace should be root\sms\site_xxx and not root\cimv2\site_xxx, otherwise great script. Saved me loads of time!
 
Post a Comment



<< Home
My life of learning various things about technology including network administration, development, and 3D design

Name:
Location: Chicago, Illinois, United States
ARCHIVES
January 2006 / February 2006 / March 2006 / May 2006 / June 2006 / July 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / February 2007 / March 2007 / April 2007 / May 2007 / June 2007 / August 2007 / December 2007 / January 2008 / March 2008 / April 2008 / June 2008 / July 2008 / September 2008 / December 2008 / January 2009 / February 2009 / March 2009 / May 2009 /


Powered by Blogger