Category Archives: Microsoft SMS / ConfigMgr

SCCM SQL Query to Build Uninstaller Batch File

Published by:

I created the follow SQL query to create a batch file that uninstalls all known versions of a piece of software. Feel free to use and tweak as you see fit. You should build the query first to make sure you’re only identifying the GUIDs for software you really want to uninstall. You’ll need to setup SSMS to output as text instead of grid view, then copy and paste into a new batch file and trim the top and bottom a bit to remove the junk that comes with the output.
Continue reading

SCCM SQL Query to Find Machines Impacted by AMT Firmware Exploit (INTEL-SA-00075)

Published by:

The following SQL should help identify the state of impacted systems. Please review thoroughly before relying on this information, while I believe the results should be accurate, you should do your own due diligence. Please let me know if you find any errors or have any suggestions to return better data.

More information on INTEL-SA-00075 here.

Continue reading

Recursively Query v_R_user in Configuration Manager

Published by:

The following query will allow you to search the view v_R_user in the Microsoft Configuration Manager database so that you can identify a manager and then find everyone who works for that manager all the way down the tree. I’ve found this useful in the past for joining with other information in the database to identify all the systems used by a specific group within an organization. This requires that you collect the manager name during user discovery. You can remove any fields that you don’t discover. It also requires that you have managers identified in Active Directory for discovery.

Continue reading

PowerShell Script to Report SCCM DP Disk Space

Published by:

I wrote the following script to quickly output how much disk space my SCCM Distribution Points consumed.  If you’re not running a CAS, you’ll want to change line 21 to point to your primary.  This requires that you have the Configuration Manager console installed on the machine.

It’s not pretty but it did the trick.  I’m certainly open to suggestions in the comments.

Continue reading

SCCM SQL Query to Determine Installed Browsers

Published by:

I recently wrote the following SQL Query to help identify which browsers are installed across our environment.  A straight Add/Remove Programs (v_AddRemovePrograms) query didn’t really return the data in such a way that made it easy to determine major version of Firefox or Chrome, and doesn’t include Internet Explorer since that’s not listed in Add/Remove Programs.  This view alone also does not capture user based installations of Chrome.  You may need to modify slightly for your environment.

Continue reading