Skip Navigation Links.
Introduction to Novo Solutions
Upgrade Guides
Novo Documentation Library
Issues
Release Notes

PC Inventory Scripting

In order for the inventory check to run automatically, the following script should be used. Once that script has been placed into an existing logon script, or pasted into a new batch file, you should add this script to your group policy:

net start winmgmt
sc config winmgmt start= auto

netsh advfirewall firewall add rule dir=in name ="WMI" program=%systemroot%\system32\svchost.exe service=winmgmt action = allow protocol=TCP localport=any

net use J: /delete /yes
net use J: \\
hiddenUNC\folder$

J:

cscript.exe GetSysInfo.vbs

net use J: /delete /yes

exit

Command Definitions:

  1. net start winmgmt - Start the WMI service
  2. sc config winmgmt start= auto - set the WMI service to start automatically
  3. netsh advfirewall firewall add rule dir=in name ="WMI" program=%systemroot%\system32\svchost.exe service=winmgmt action = allow protocol=TCP localport=any - Create a Windows Firewall exception for WMI queries
  4. net use J: /delete /yes - DELETES ANY CURRENT DRIVE MAP AT THE INDICATED LETTER

    Note: The above "net use #: /delete" command is optional.  However, if the drive letter is already in use, the script will not execute.

    Note: The choice of drive letter used is also optional. We used "J" as an example.

  5. net use J: \\hiddenUNC\folder$ - Create a temporarily mapped drive to NovoRoot"pc_inventory"Current to execute the WMI query
  6. J: - Change to the mapped drive
  7. cscript.exe GetSysInfo.vbs - Executes the script

    Note: The GetSysInfo.vbs will copy a file similar to "ComputerName_SystemInfo.xml" to the mapped drive


  8. net use J: /delete /yes - Deletes the mapped drive
  9. exit - close command prompt window