Last active
June 2, 2023 00:01
-
-
Save 3kh0/cd1527d4a2442c7937e8acd8f1733be6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$consoleWidth = [Console]::WindowWidth | |
$consoleHeight = [Console]::WindowHeight | |
$ram = Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object -ExpandProperty TotalPhysicalMemory | |
$cpu = Get-CimInstance -ClassName Win32_Processor | Select-Object -ExpandProperty Name | |
$gpuList = Get-CimInstance -ClassName Win32_VideoController | Select-Object -ExpandProperty Name | |
$gpu = $gpuList -join ', ' | |
$os = (Get-WmiObject -Class Win32_OperatingSystem).Caption | |
$disk = Get-PSDrive -PSProvider FileSystem | Where-Object {$_.Root -like 'C:\'} | Select-Object Used, Free | |
$usedSpace = [math]::Round(($disk.Used / 1GB), 2) | |
$freeSpace = [math]::Round(($disk.Free / 1GB), 2) | |
$totalSpace = [math]::Round(($usedSpace + $freeSpace), 2) | |
$systemInfo = @" | |
Screen Size: $($consoleWidth) x $($consoleHeight) | |
RAM: $([math]::Round($ram / 1GB, 2)) GB | |
CPU: $($cpu) | |
GPU: $($gpu) | |
Operating System: $($os) | |
Storage Space: Used - $($usedSpace) GB, Free - $($freeSpace) GB (Total - $($totalSpace) GB) | |
"@ | |
Write-Host $systemInfo | |
$systemInfo | Set-Clipboard |
IEX(New-Object Net.WebClient).DownloadString('https://gist.githubusercontent.com/3kh0/cd1527d4a2442c7937e8acd8f1733be6/raw/92c012f323b326c208dbb416fa4dd6ccd92645e6/system_info.ps1')
IEX(New-Object Net.WebClient).DownloadString('https://gist.githubusercontent.com/3kh0/cd1527d4a2442c7937e8acd8f1733be6/raw/92c012f323b326c208dbb416fa4dd6ccd92645e6/system_info.ps1')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Command to run: