Custom Inventory Solution 7 Script Examples
Please see the attached ZIP file as it contains many Custom Inventory Solution 7 VBScript examples. Many of the custom inventory scripts would need to be slightly modified in order to work in your environment but should provide a good starting framework. We use custom inventory a lot for configuration management purposes to ensure that all of our systems are configured the same way. The scripts are very elementary and likely not as efficient as they should be as I am by no means a scripting guru.
You will of course need to create an associated custom data class for each script and update the GUID in the script to reference the data class.
Create a Data Class and Obtain GUID:
Update Script with Data Class GUID:
Update Script with Data Class Field Info:
Performs a WMI query that pulls back information about all the local user accounts on a system.
Performs a WMI query and pulls back the date and time the system was built.
Opens a text based configuration file (tecad_win.conf) and pulls back values within the configuration file.
Performs a WMI query and pulls back IIS FTP Server Settings
This script for HP Servers only. It searches the registry to see if the server has teamed NICS and reports the configuration. It reports if the NICs are teamed, number of adapters in the team, teaming configuration, and the operating mode value.
Performs a WMI query and pulls back information about the recovery options configured on the system. For example, Debug File Path, AutoReboot, Mini Dump Directory, etc.
Performs a WMI query and pulls back information about the IIS Virtual Directory Settings
Performs a WMI query and pulls back information about how the system event logs are configured.
Searches the registry for SNMP configuration settings. For example, community string, security configuration, and trap destinations.
Searches Active Directory for the computers description recorded in AD. The script then creates/updates a registry key locally on the system that includes the computers AD description. This script would need to be modified a little to search the appropriate OU and domain structure for your organization.
Performs a WMI query and pulls back whether or not IIS isolation mode is enabled.
Searches for a specific registry keys and brings back their value.
Searches the registry for specific system environment variables and pulls back the values
Uses uptime.exe to bring back information about System Availability including Total Uptime, Total Downtime, Total Reboots, Mean Time Between Reboots and Total Bluescreens. The script is configured to pull this information for the past 30 days but that value is changeable. The script launches uptime.exe and writes the results to an .INI file and then the script reads the .INI file to obtain the values.