Cómo automatizar el cifrado EFS de Microsoft para Windows 7 XP o Vista
Hace unos días necesitaba crear un script quecifraría carpetas para mis usuarios finales en el trabajo. Escribí el código a continuación y luego lo incluí en un script de inicio de sesión que luego se ejecutaría cuando mis usuarios iniciaran sesión en sus sistemas. El propósito del cifrado es proteger los datos confidenciales de la empresa almacenados en computadoras de escritorio y portátiles. Aunque el proceso funcionó para mí, ¡le recomiendo que lo pruebe a fondo antes de implementarlo!
El siguiente código es un proceso simple que hace algunas cosas:
- Cifra todos los datos en la carpeta "Mis documentos" de los usuarios registrados.
- Cifra todos los datos en la carpeta "Outlook" de los usuarios registrados. Esta es la ubicación predeterminada que Outlook 2000 y Outlook 2003 almacenan archivos .pst y .ost.
- Canaliza todos los resultados del script en un archivo para su posterior recopilación. El archivo se puede ubicar debajo de "Mis documentos" del usuario conectado. El archivo se llamará% computername% .efs.
Windows XP
REM @echo off REM EFS MyDoc & Outlook EFS Encryption Script Version 1.1 REM https://www.groovypost.com REM REM Script Created by MrGroove (groovyPost.com) REM REM This program is free software; not to be redistributed REM without permission of groovyPost.com REM echo ***** >> "%userprofile%my documents%computername%.efs" REM EFS Encryption Script Version 1.1 REM ====================================================== REM First, let"s create a file to store all the work were doing and for history echo ****** >> "%userprofile%my documents%computername%.efs" echo ****** >> "%userprofile%my documents%computername%.efs" REM ====================================================== echo %date% %time% >> "%userprofile%My documents%computername%.efs" REM =================================================== REM Now were going to update all files to ensure no files are encrypted with old keys cipher /u >> "%userprofile%My documents%computername%.efs" REM =================================================== REM Begin encryption of the "My Documents" folder cipher /a /e /h /i /q /s:"%userprofile%My Documents" >> "%userprofile%My documents%computername%.efs" REM ====================================================== REM Begin encrption of the "Outlook" folder where the OST and PST files are stored cipher /a /e /h /i /q /s:"%userprofile%Local SettingsApplication DataMicrosoftOutlook" >> "%userprofile%My documents%computername%.efs" REM ================================================== REM More House Keeping echo %date% %time% >> "%userprofile%My documents%computername%.efs" echo ****** >> "%userprofile%My documents%computername%.efs" echo ****** >> "%userprofile%My documents%computername%.efs" REM ================================================== REM ================================================== REM All Done!
Windows 7
REM @echo off REM EFS MyDoc & Outlook EFS Encryption Script Version 1.1 REM https://www.groovypost.com REM REM Script Created by MrGroove (groovyPost.com) REM REM This program is free software; not to be redistributed REM without permission of groovyPost.com REM echo ***** >> "%userprofile%documents%computername%.efs" REM EFS Encryption Script Version 1.1 REM ====================================================== REM First, let"s create a file to store all the work were doing and for history echo ****** >> "%userprofile%documents%computername%.efs" echo ****** >> "%userprofile%documents%computername%.efs" REM ====================================================== echo %date% %time% >> "%userprofile%documents%computername%.efs" REM =================================================== REM Now were going to update all files to ensure no files are encrypted with old keys cipher /u >> "%userprofile%documents%computername%.efs" REM =================================================== REM Begin encryption of the "Documents" folder cipher /a /e /h /i /q /s:"%userprofile%Documents" >> "%userprofile%documents%computername%.efs" REM ====================================================== REM Begin encrption of the "Outlook" folder where the OST and PST files are stored cipher /a /e /h /i /q /s:"%userprofile%Local SettingsApplication DataMicrosoftOutlook" >> "%userprofile%documents%computername%.efs" REM ================================================== REM More House Keeping echo %date% %time% >> "%userprofile%documents%computername%.efs" echo ****** >> "%userprofile%documents%computername%.efs" echo ****** >> "%userprofile%documents%computername%.efs" REM ================================================== REM ================================================== REM All Done!
Deja un comentario