Directly send a simple query system basic information of the PS script bar, bored to write, I use the grammar are easy to understand. There should be no rare place, the only one is to call the WS window.
<#
Simple System Info Tool
Author:roger, Zhang
version:1.0
#>
$disk = get-wmiobject win32_logicaldisk-computername ' localhost '-filter "deviceid= ' C: '"
$drive = $disk. DeviceID
$free = $disk. FreeSpace
$size = $disk. Size
$used = 1-$free/$size
$percent = "{0:0.0%}"-F $used
$os = Get-wmiobject-class Win32_OperatingSystem
$version = $os. Version
$ip = (Get-netipaddress-interfacealias ethernet*-addressfamily IPv4). IPAddress
$user = $env: USERNAME
$a = (Get-wmiobject-class win32_physicalmemory-namespace "root\cimv2"). Capacity/1gb
$b = "{0:0.0}"-F (((Get-wmiobject-class win32_perfformatteddata_perfos_memory-namespace "root\cimv2"). availablembytes)/1014)
$mem = $a-$b
$cpus = (Get-wmiobject win32_processor). Count
$msg = "
User ' $user '
Hostname ' $env: ComputerName '
CPU: $cpus Core
Memory free $mem of $a GB
IPaddress ' $ip '
Drive ' $drive ' used ' $percent '
OS ' Windows$version '
"
Write-host $msg
$ws = New-object-comobject Wscript.Shell
$WSR = $ws. Popup ("$msg", "999", "SystemInfo", 0 + 64)
One-click PowerShell script to query system Windows basic information