jtuttas
6/1/2014 - 9:26 AM

computerinfo.ps1

$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