Skip to content

Instantly share code, notes, and snippets.

@gfhuertac
Created May 8, 2022 19:15
Show Gist options
  • Save gfhuertac/a4af5fc696d04779a57df3fdf346a130 to your computer and use it in GitHub Desktop.
Save gfhuertac/a4af5fc696d04779a57df3fdf346a130 to your computer and use it in GitHub Desktop.
# Listing 1 - Get-SystemInfo.ps1
Get-CimInstance -Class Win32_OperatingSystem |
Select-Object Caption, InstallDate, ServicePackMajorVersion,
OSArchitecture, BootDevice, BuildNumber, CSName,
@{l='Total_Memory';e={[math]::Round($_.TotalVisibleMemorySize/1MB)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment