Get-WinSAT

#Requires -RunAsAdministrator         
$WinSAT = Get-ChildItem -Path $ENV:SystemRoot -Recurse -Include WinSAT.exe -ErrorAction SilentlyContinue | Where-Object {$_.Directory -notmatch "WinSxS"}
Set-Location $WinSAT.Directory
Start-Process -FilePath .\WinSAT.exe -ArgumentList "formal" -NoNewWindow -Wait
Set-Location $ENV:SystemRoot
Set-Location .\Performance\WinSAT\DataStore\
$results = Get-Childitem *formal* | Sort-Object LastWriteTime | Select-Object -Last 1 -ExpandProperty FullName
[xml]$WinSATformal = Get-Content $results
$WinSATformal.WinSAT.WinSPR | Select-Object CpuScore,MemoryScore,GraphicsScore,GamingScore,DiskScore,SystemScore
Advertisements

One thought on “Get-WinSAT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s