Skip to content

Instantly share code, notes, and snippets.

@Lukaszeq
Created November 24, 2022 11:48
Show Gist options
  • Save Lukaszeq/60b647320eaf596056bbbaa1bfa2de22 to your computer and use it in GitHub Desktop.
Save Lukaszeq/60b647320eaf596056bbbaa1bfa2de22 to your computer and use it in GitHub Desktop.
Is TPM activated on this machine?
$tpmCheck = Get-Tpm
$isTpmOn = $tpmCheck."TpmActivated"
Write-Host "Is TPM activated on this machine?"
$isTpmOn = [bool]$isTpmOn
if (($isTpmOn) -eq $true) {
Write-Host "Yes, TPM is activated." -ForegroundColor Green
}
else {
Write-Host "No, TPM is not activated." -ForegroundColor Red
}
@Lukaszeq
Copy link
Author

PL 🇵🇱 l10n

$tpmCheck = Get-Tpm
$isTpmOn = $tpmCheck."TpmActivated"
Write-Host "Czy TPM jest aktywny?"

$isTpmOn = [bool]$isTpmOn

if (($isTpmOn) -eq $true) {
Write-Host "Tak, TPM jest aktywny" -ForegroundColor Green
}
else {
Write-Host "Nie, TPM nie jest aktywny." -ForegroundColor Red
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment