Last active
July 29, 2016 14:20
-
-
Save gaelcolas/2a4f2f6553bddca3a26164612a6761dc to your computer and use it in GitHub Desktop.
Q&D PowerShell Temperature Gauge for Surface Pro 3
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
$pshost = get-host | |
$pswindow = $pshost.ui.rawui | |
$newsize = $pswindow.windowsize | |
$newsize.height = 8 | |
$newsize.width = 80 | |
$pswindow.windowsize = $newsize | |
$pswindow.buffersize = $newsize | |
cls;while ($true){ | |
$temp = gwmi MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" | |
$ProgressParams = @{ | |
PercentComplete = (($temp.CurrentTemperature / $temp.CriticalTripPoint)*100) | |
Activity = "Temperature $($temp.CurrentTemperature)" | |
Status = (Get-date) | |
} | |
Write-Progress @ProgressParams | |
Start-Sleep 15 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made this shortcut to call the content of the Gist:
(wget 'http://bit.ly/2a4WXEz').content | iex