Have you ever wanted to collect local administrator information on a regular basis? If you have ConfigMgr, here’s how to do it. We gave you some background recently through Jesse’s post about MIF files found here.
Here’s what we’re going to accomplish:
- Gather the members of the local administrators group on all Windows clients and servers
- Ensure the data is updated regularly through the use of ConfigMgr’s hardware inventory cycles
- Extend ConfigMgr’s HWI classes to add the Local Administrator information in Resource Explorer as seen here:
We need to set some ConfigMgr client agent properties, so navigate to Administration Node > Client Settings > choose the client settings to modify > and select Hardware Inventory. A couple of modifications to the properties of Hardware inventory – Collect MIF files and change the Custom Inventory Size (optional) as seen here:
Now, you’ll need to create the MOF file to extend the ConfigMgr inventory classes. Here’s the MOF I created for the Local Admins solution:
Here’s the .DOCX file so you don’t have to retype: MOF
The hardware inventory class has now been extended. The next step is to generate a MIF file on a regular basis. The method I’ve used in the past is to run a recurring deployment/advertisement that executes a script (VBS in this case, soon to be updated to powershell). Here’s the VBScript I’ve used in the past:
And here’s the .DOCX file so you don’t have to retype: script
Write me an E-mail or comment on this post with questions. Enjoy!
Update: I forgot to mention, the path for MIF in the VBScript will need to be updated for Site servers. You can use requirement rules, or the good ol’ fashioned way of controlling deployments via collections to control what scripts are running on what clients/servers.