This script is to encrypt the drive in BitLocker
The Recovery key will be sent to your provided email.
Note: You cannot decrypt the drive without using the Recovery key.
Also, check this link to set an App Password for sending email using Gmail
https://wiki.xcitium.com/frontend/web/topic/how-to-create-an-app-password-for-gmail
Run as system user
PYTHON SCRIPT FILE SHA1 VALUE - 0d54bae09b831c1c95803536440814110c9edc57
JSON FILE SHA1 VALUE - c09c7282f42bece87f6815ff18d3d0944c8ea5f5
Update the variables as required in the script before running.
Drive="D:" #Enter the Drive you want to encrypt
email_to = ['admin@example.com'] # List of recipients
email_from = 'your.email@gmail.com' # Sender email
email_password = 'your-app-password' # App Password which we configured
smtp_server = 'smtp.gmail.com' # SMTP server
smtp_port = 587 # SMTP port (TLS - 587, SSL - 465)
recovery_save_path = r'C:\RecoveryKeys' # Folder to save recovery key
Comments