Software installed with MSI
For all software installed with any installer, registry level script here. Use to run cscript.exe somescript.vbs
Output Types: HTML, CSV, and XML
Just use /format:hform.xsl, /format:csv.xsl, /translate:basicxml /format:rawxml.xsl to select your desired output.(use the trnaslate with xml, changes the >'s and <'s to meaningful characters in xml, otherwise just use /format:rawxml.xsl)
CSV output: (there are more headings available for each of these path's, these are examples. For full headers, type /? after "get" to recieve a full list.)
For Example:
wmic:root\cli>product get /?
Property get operations.
USAGE:
GET [] []
NOTE: ::= | ,
The following properties are available:
Property Type Operation
======== ==== =========
Description N/A N/A
IdentifyingNumber N/A N/A
InstallDate N/A N/A
InstallLocation N/A N/A
InstallState N/A N/A
Name N/A N/A
PackageCache N/A N/A
SKUNumber N/A N/A
Vendor N/A N/A
Version N/A N/A
The following GET switches are available:
/VALUE - Return value.
/ALL(default) - Return the data and metadata for the attribute.
/TRANSLATE: - Translate output via values from
.
/EVERY: [/REPEAT:] - Returns value every (X interval) seconds, If /REPEAT specified the command is executed times.
/FORMAT: - Keyword/XSL filename to process the XML results.
NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of output.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be followed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results will be done.
===INSTALLED SOFTWARE:===
wmic product get Name, Version, Vendor, Description, PackageCache, IdentifyingNumber, InstallLocation, InstallState,SKUNumber /format:htable >MSIInstalledSoftware.html
wmic product get Name, Version, Vendor, Description, PackageCache, IdentifyingNumber, InstallLocation, InstallState,SKUNumber /format:csv >MSIInstalledSoftware.csv
Aside remove c:\ in all cases below (not writable characater)
===BIOS:===
wmic /output:C:\Bios.csv BIOS get Name, SMBIOSBIOSVersion, SerialNumber, Version, BuildNumber, Status /format:csv.xsl
===PC:===
wmic /output:C:\PC.csv COMPUTERSYSTEM get CurrentTimeZone, Description, Domain, TotalPhysicalMemory, Model, Name, UserName /format:csv.xsl
===Memory:===
wmic /output:C:\Mem.csv MEMLOGICAL get /all /format:csv.xsl
===NIC:===
wmic /output:C:\NIC.csv NICCONFIG get DNSDomain, DNSHostName, DefaultIPGateway, Description, IPAddress, IPSubnet, MACAddress, ServiceName, WINSPrimaryServer, WINSSecondaryServer /format:csv.xsl
===Processor:===
wmic /output:C:\Proc.csv CPU get Description, DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:csv.xsl
===QuickFixEngineering:===
wmic /output:C:\QFE.csv QFE get CSName, Description, FixComments, HotFixID, InstalledBy, InstalledOn, Name, ServicePackInEffect /format:csv.xsl
=================================================================
You can find more system information by calling the Path's you would in WMI
CSV output using the Win32_ Path's you'd use in wmi, the very same you'd see in the script-o-matic tool from Microsoft
===Disk:===
wmic /output:C:\Dsk.csv /namespace:\\root\cimv2 path Win32_LogicalDisk get FileSystem, FreeSpace, Size, VolumeSerialNumber, VolumeName, caption, description /format:csv.xsl
===PC:===
wmic /output:C:\PC.csv /namespace:\\root\cimv2 path Win32_ComputerSystem get CurrentTimeZone, Description, Domain, TotalPhysicalMemory, Model, Name, UserName /format:csv.xsl
===BIOS:===
wmic /output:C:\Bios.csv /namespace:\\root\cimv2 path Win32_BIOS get Name, SMBIOSBIOSVersion, SerialNumber, Version, BuildNumber, Status /format:csv.xsl
===Memory:===
wmic /output:C:\Mem.csv /namespace:\\root\cimv2 path Win32_LogicalMemoryConfiguration get AvailableVirtualMemory, Caption, Description, Name, SettingID, TotalPageFileSpace, TotalPhysicalMemory, TotalVirtualMemory /format:csv.xsl
===NIC:===
wmic /output:C:\NIC.csv /namespace:\\root\cimv2 path Win32_NetworkAdapterConfiguration get Caption, DNSDomain, DNSHostName, DefaultIPGateway, Description, IPAddress, IPSubnet, MACAddress, ServiceName, WINSPrimaryServer, WINSSecondaryServer /format:csv.xsl
===Processor:===
wmic /output:C:\Proc.csv /namespace:\\root\cimv2 path Win32_Processor get Caption, Description, DeviceID, Manufacturer, MaxClockSpeed, Name, Status, SystemName /format:csv.xsl
===QuickFixEngineering:===
wmic /output:C:\QFE.csv /namespace:\\root\cimv2 path Win32_QuickFixEngineering get CSName, Caption, Description, FixComments, HotFixID, InstalledBy, InstalledOn, Name, ServicePackInEffect /format:csv.xsl
===PlugNPlay:===
wmic /output:C:\PnP.csv /namespace:\\root\cimv2 path Win32_PNPEntity get ConfigManagerErrorCode, DeviceID, Service, Status, SystemName /format:csv.xsl
No comments:
Post a Comment