tacticalrmm/scripts/Win_Activation_Check.ps1

13 lines
260 B
PowerShell
Raw Normal View History

2021-07-17 14:33:31 +00:00
$WinVerAct = (cscript /Nologo "C:\Windows\System32\slmgr.vbs" /xpr) -join ''
if ($WinVerAct -like '*Activated*') {
Write-Output "All looks fine $WinVerAct"
exit 0
}
else {
Write-Output "Theres an issue $WinVerAct"
exit 1
}
Exit $LASTEXITCODE