Sådan automatiseres Microsoft EFS-kryptering til Windows 7 XP eller Vista
For et par dage siden havde jeg brug for at oprette et script, somville kryptere mapper til mine slutbrugere på arbejdet. Jeg skrev koden nedenfor og kastede den i et login-script, der derefter kørte, mens mine brugere loggede på deres systemer. Formålet med krypteringen er at beskytte følsomme virksomhedsdata, der er gemt på desktops og laptops. Selvom processen virkede for mig, anbefaler jeg, at du tester den grundigt, før du implementerer!
Koden nedenfor er en enkel proces, der gør et par ting:
- Krypterer alle data i de loggede brugermapper "Mine dokumenter".
- Krypterer alle data i den loggede brugeres “Outlook” -mappe. Dette er standardplaceringen Outlook 2000 og Outlook 2003 lagrer .pst- og .ost-filer.
- Rør alt output fra scriptet til en fil til senere samling. Filen kan placeres under den indloggede brugers “Mine dokumenter”. Filen kaldes% computernavn% .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!
Efterlad en kommentar