Come controllare lo stato di BitLocker su tutte le partizioni di un PC remoto

Vai al contenuto principale
Categories
You are here:

Per verificare se BitLocker è attivo su tutte le partizioni del disco di un computer remoto utilizzando PowerShell, puoi usare il cmdlet Get-BitLockerVolume in combinazione con PowerShell Remoting (WinRM), che ti permette di eseguire comandi su macchine remote.

Prerequisiti

  1. PowerShell Remoting abilitato sul computer remoto (Enable-PSRemoting -Force).

  2. Account con privilegi amministrativi sul computer remoto.

  3. Firewall e configurazione della rete che consenta WinRM (porta 5985 per HTTP, 5986 per HTTPS).

Comando powershell

Invoke-Command -ComputerName “NomeComputerRemoto” -ScriptBlock {
Get-BitLockerVolume | Select-Object MountPoint, VolumeStatus, ProtectionStatus
}

Significato dei campi:

  • MountPoint: lettera dell’unità (es. C:, D:)

  • VolumeStatus: stato del volume (es. FullyEncrypted, EncryptionInProgress, etc.)

  • ProtectionStatus:

    • 1 = Protetto (BitLocker attivo)

    • 0 = Non protetto

Il comando può essere dato anche per una serie di computer

$computers = @(“PC1”, “PC2”, “PC3”)

foreach ($comp in $computers) {
Write-Host “Verifica BitLocker su $comp”
Invoke-Command -ComputerName $comp -ScriptBlock {
Get-BitLockerVolume | Select-Object MountPoint, VolumeStatus, ProtectionStatus
}
}