-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetPCSpecs.bat
More file actions
60 lines (47 loc) · 1.96 KB
/
GetPCSpecs.bat
File metadata and controls
60 lines (47 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
chcp 65001 >nul 2>&1 :: Set UTF-8 encoding
:: Set output file path
set "OutputFile=%USERPROFILE%\Desktop\PC_Specs.txt"
:: Clear previous file
echo. > "%OutputFile%"
:: Write system specs
echo ====== PC Specifications ====== >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Serial Number
echo Serial Number: >> "%OutputFile%"
wmic bios get serialnumber | findstr /v "SerialNumber" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Device Name
echo Device Name: %COMPUTERNAME% >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Processor
echo Processor: >> "%OutputFile%"
wmic cpu get name | findstr /v "Name" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Installed RAM
echo Installed RAM (GB): >> "%OutputFile%"
wmic computersystem get totalphysicalmemory | findstr /v "TotalPhysicalMemory" | powershell -NoProfile -Command "& { [math]::Round($(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory / 1GB, 2) }" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Operating System
echo Operating System: >> "%OutputFile%"
wmic os get caption, version | findstr /v "Caption Version" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: System Manufacturer & Model
echo Manufacturer : >> "%OutputFile%"
wmic computersystem get manufacturer | findstr /v "Manufacturer Model" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Disk Space
echo Disk Space Information: >> "%OutputFile%"
wmic logicaldisk get deviceid, volumename, size, freespace | findstr /v "DeviceID" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Installed Graphics Card
echo Graphics Card: >> "%OutputFile%"
wmic path win32_videocontroller get caption | findstr /v "Caption" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Network Adapters
echo Network Adapters (Enabled): >> "%OutputFile%"
wmic nic where "NetEnabled=True" get Name, MACAddress | findstr /v "Name MACAddress" >> "%OutputFile%"
echo. >> "%OutputFile%"
:: Notify user
echo PC specifications have been saved to %OutputFile%
pause