Advertisement
Guest User

Untitled

a guest
Jan 18th, 2024
973
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $TPMStatus = Get-Tpm
  2. if ($TPMStatus.TpmPresent -and $TPMStatus.TpmVersion -eq "2.0") {
  3.     $SATAVolumes = Get-PhysicalDisk | Where-Object MediaType -eq "Unspecified" | Get-Disk | Get-Partition | Get-Volume
  4.     foreach ($Volume in $SATAVolumes) {
  5.         $BitLockerStatus = Get-BitLockerVolume -MountPoint $Volume.DriveLetter
  6.         if ($BitLockerStatus.VolumeStatus -ne "FullyEncrypted") {
  7.             Enable-BitLocker -MountPoint $Volume.DriveLetter -UsedSpaceOnly -SkipHardwareTest -RecoveryPasswordProtector
  8.         }
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement