-
Notifications
You must be signed in to change notification settings - Fork 0
/
Show-ComputerInfo.ps1
52 lines (40 loc) · 2.05 KB
/
Show-ComputerInfo.ps1
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
##############################################################################
#.SYNOPSIS
# Demo WMI.
#.NOTES
# Legal: Script provided "AS IS" without warranties or guarantees of any
# kind. USE AT YOUR OWN RISK. Public domain, no rights reserved.
##############################################################################
"`n"
"----------------------------------------------------------"
" Computer Information"
"----------------------------------------------------------"
get-wmiobject -query "SELECT * FROM Win32_ComputerSystem" |
select-object Name,Domain,Description,Manufacturer,Model,NumberOfProcessors,`
TotalPhysicalMemory,SystemType,PrimaryOwnerName,UserName
"----------------------------------------------------------"
" BIOS Information"
"----------------------------------------------------------"
get-wmiobject -query "SELECT * FROM Win32_BIOS" |
select-object Name,Version,SMBIOSBIOSVersion
"----------------------------------------------------------"
" CPU Information"
"----------------------------------------------------------"
get-wmiobject -query "SELECT * FROM Win32_Processor" |
select-object Manufacturer,Name,CurrentClockSpeed,L2CacheSize
"----------------------------------------------------------"
" Operating System Information"
"----------------------------------------------------------"
get-wmiobject -query "SELECT * FROM Win32_OperatingSystem" |
select-object Caption,BuildNumber,Version,SerialNumber,ServicePackMajorVersion,InstallDate
"----------------------------------------------------------"
" Name of Built-In Administrator Account (Even If Renamed)"
"----------------------------------------------------------"
get-wmiobject -query "SELECT * FROM Win32_UserAccount" |
where-object {$_.SID -match '-500$'} |
select-object Name
"----------------------------------------------------------"
" Installed Hotfixes"
"----------------------------------------------------------"
get-wmiobject -query "SELECT * FROM Win32_QuickFixEngineering" |
select-object HotFixID