add script
This commit is contained in:
16
Windows/Enable-Bitlocker.ps1
Normal file
16
Windows/Enable-Bitlocker.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
# Bitlocker avec TPM
|
||||
if ((Get-BitLockerVolume -MountPoint $env:SystemDrive).VolumeStatus -eq "FullyDecrypted") {
|
||||
|
||||
Add-BitLockerKeyProtector -MountPoint $env:SystemDrive -TpmProtector
|
||||
Enable-BitLocker -MountPoint $env:SystemDrive -RecoveryPasswordProtector -SkipHardwareTest
|
||||
|
||||
}
|
||||
|
||||
#Bitlocker avec mot de passe
|
||||
if ((Get-BitLockerVolume -MountPoint $env:SystemDrive).VolumeStatus -eq "FullyDecrypted") {
|
||||
|
||||
$BitLockerPwd = ConvertTo-SecureString "Password" -AsPlainText -Force
|
||||
Add-BitLockerKeyProtector -MountPoint $env:SystemDrive -PasswordProtector -Password $BitLockerPwd
|
||||
Enable-BitLocker -MountPoint $env:SystemDrive -RecoveryPasswordProtector -SkipHardwareTest
|
||||
|
||||
}
|
Reference in New Issue
Block a user