Skip to content

Instantly share code, notes, and snippets.

@jtuttas
Created June 1, 2014 09:26
Show Gist options
  • Save jtuttas/d77220db78f086115b10 to your computer and use it in GitHub Desktop.
Save jtuttas/d77220db78f086115b10 to your computer and use it in GitHub Desktop.
$ci=New-Object System.Object | Select-Object -Property MACAddress,Architecture,OS,RAM,freeDiskspace,ComputerName
$ci.MACAddress=Get-WmiObject win32_networkadapterconfiguration | Where-Object ipaddress | Select-Object -ExpandProperty MACAddress
$ci.Architecture=(Get-WmiObject win32_operatingsystem).OSArchitecture
$ci.OS=(Get-WmiObject win32_operatingsystem).Caption
[double]$ci.RAM=(Get-WmiObject win32_computersystem).totalPhysicalmemory/1gb
$ci.freeDiskspace=(Get-WmiObject win32_logicaldisk) | Where-Object {$_.DeviceID -eq "c:"} | Select-Object -ExpandProperty FreeSpace
$ci.ComputerName=$env:COMPUTERNAME
$ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment