Skip to content

Instantly share code, notes, and snippets.

View erickximenes's full-sized avatar
:octocat:

Erick Ximenes erickximenes

:octocat:
View GitHub Profile
$timer = new-timespan -Minutes 1
$clock = [diagnostics.stopwatch]::StartNew()
while ($clock.elapsed -lt $timer){
$command=Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" | Ft @{Expression={$_.InstanceName};Label="CORE#"},@{Expression={($_.CurrentTemperature / 10) - 273.15};Label="CELSIUS"},@{Expression={((9/5) * (($_.CurrentTemperature / 10) - 273.15) + 32)};Label="FAHRENHEIT"} >> temperatura.txt
cls
$command
start-sleep -seconds 5
}
write-host "fim da analise de temperatura (^_^)"
@erickximenes
erickximenes / clean1_0.bat
Last active May 16, 2022 11:28
Cleaning up temporary files. S.O: Windows
@REM autor: Erick X. Vasconcelos
@REM contato: erick_vasconcelos_contato@outlook.com
del /q /f /s %TEMP%\*
del /q /f /s C:\Windows\Temp\*
del /q /f /s C:\Windows\Prefetch\*
exit