You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$activationStatus = Get-WmiObject -Query "SELECT LicenseStatus FROM SoftwareLicensingProduct WHERE PartialProductKey IS NOT NULL" | Select-Object -First 1
if ($activationStatus.LicenseStatus -eq 1) {
return "Aktywowany"
} else {
return "Nieaktywowany"
}
})
# Wyświetlenie wyniku
Write-Host ("Status aktywacji na stacji {0}: {1}" -f $stacja, $status)
# Zapisanie wyniku do pliku
$wynik = "{0} {1}" -f $stacja, $status
$wynik | Out-File -FilePath "wyniki.txt" -Append
}
Write-Host "Proces sprawdzania aktywacji został zakończony."