Thomas M Posted October 6, 2010 Report post Posted October 6, 2010 I pull this info out in order to have a complete register of all our computer systems in case of theft or insurance issues. DNSHostName=XXX10001 Manufacturer=LENOVO Version=ThinkCentre A57 Model=970273G SerialNumber=LMXXXXX UserName=Domain\Username FullName=Lastname, Firstname Middlename Caption=Microsoft Windows 7 Enterprise Version=6.1.7600 OSArchitecture=64-bit InstallDate=20100728133244.000000+120 IPAddress={"10.0.0.2","fe80::19da:933c:93c4:51a1"} MACAddress=00:11:22:33:44:AA Here's the script @echo off WMIC PATH Win32_ComputerSystem Get DNSHostName /Value | FIND "=" WMIC PATH Win32_BIOS Get Manufacturer /Value | FIND "=" WMIC PATH Win32_ComputerSystemProduct Get Version /Value | FIND "=" WMIC PATH Win32_ComputerSystem Get Model /Value | FIND "=" WMIC PATH Win32_BIOS Get SerialNumber /Value | FIND "=" WMIC PATH Win32_ComputerSystem Get UserName /Value | FIND "=" WMIC PATH Win32_UserAccount where name="%username%" get FullName /value | FIND "=" WMIC PATH Win32_OperatingSystem Get Caption /Value | FIND "=" WMIC PATH Win32_OperatingSystem Get Version /Value | FIND "=" WMIC PATH Win32_OperatingSystem Get OSArchitecture /Value | FIND "=" WMIC PATH Win32_OperatingSystem Get InstallDate /Value | FIND "=" WMIC PATH Win32_NetworkAdapterConfiguration where "IPEnabled=true" Get IPAddress /Value | FIND "=" WMIC PATH Win32_NetworkAdapterConfiguration where "IPEnabled=true" Get MACAddress /Value | FIND "=" Quote Share this post Link to post Share on other sites More sharing options...
0 Thomas M Posted October 6, 2010 Report post Posted October 6, 2010 Ps. If anyone has a good solution to format the InstallDate string I'd be very happy. InstallDate=20100728133244.000000+120 Would prefer it to be in a readable format (2010-07-28 13:32:44) I know this can be done easily in PowerShell, but as we've still got some XP clients without the Powershell client I don't think that can be done. This is why I've decided to use a simple batch script to be run using the logon script. -Thomas Quote Share this post Link to post Share on other sites More sharing options...
0 seordin Posted February 1, 2014 Report post Posted February 1, 2014 @echo offFOR /F "usebackq tokens=2 delims==" %%A in (`WMIC PATH Win32_OperatingSystem Get InstallDate /VALUE^|FIND "="`) DO SET i=%%ASET InstallDate=%i:~0,4%-%i:~4,2%-%i:~6,2% %i:~8,2%:%i:~10,2%:%i:~12,2%ECHO InstallDate=%InstallDate% Quote Share this post Link to post Share on other sites More sharing options...
I pull this info out in order to have a complete register of all our computer systems in case of theft or insurance issues.
DNSHostName=XXX10001
Manufacturer=LENOVO
Version=ThinkCentre A57
Model=970273G
SerialNumber=LMXXXXX
UserName=Domain\Username
FullName=Lastname, Firstname Middlename
Caption=Microsoft Windows 7 Enterprise
Version=6.1.7600
OSArchitecture=64-bit
InstallDate=20100728133244.000000+120
IPAddress={"10.0.0.2","fe80::19da:933c:93c4:51a1"}
MACAddress=00:11:22:33:44:AA
Here's the script
@echo off
WMIC PATH Win32_ComputerSystem Get DNSHostName /Value | FIND "="
WMIC PATH Win32_BIOS Get Manufacturer /Value | FIND "="
WMIC PATH Win32_ComputerSystemProduct Get Version /Value | FIND "="
WMIC PATH Win32_ComputerSystem Get Model /Value | FIND "="
WMIC PATH Win32_BIOS Get SerialNumber /Value | FIND "="
WMIC PATH Win32_ComputerSystem Get UserName /Value | FIND "="
WMIC PATH Win32_UserAccount where name="%username%" get FullName /value | FIND "="
WMIC PATH Win32_OperatingSystem Get Caption /Value | FIND "="
WMIC PATH Win32_OperatingSystem Get Version /Value | FIND "="
WMIC PATH Win32_OperatingSystem Get OSArchitecture /Value | FIND "="
WMIC PATH Win32_OperatingSystem Get InstallDate /Value | FIND "="
WMIC PATH Win32_NetworkAdapterConfiguration where "IPEnabled=true" Get IPAddress /Value | FIND "="
WMIC PATH Win32_NetworkAdapterConfiguration where "IPEnabled=true" Get MACAddress /Value | FIND "="
Share this post
Link to post
Share on other sites