Kā automatizēt Microsoft EFS šifrēšanu operētājsistēmai Windows 7 XP vai Vista

Pirms dažām dienām man vajadzēja izveidot skriptušifrētu mapes maniem gala lietotājiem darbā. Es uzrakstīju kodu zemāk, pēc tam iemetu to pieteikšanās skriptā, kas pēc tam darbotos, kad mani lietotāji pieteicās savās sistēmās. Šifrēšanas mērķis ir aizsargāt slepenus uzņēmuma datus, kas tiek glabāti galddatoros un klēpjdatoros. Lai gan process man darbojās, iesaku to rūpīgi pārbaudīt pirms izvietošanas!

Tālāk sniegtais kods ir vienkāršs process, kas veic dažas lietas:

  1. Šifrē visus datus reģistrēto lietotāju mapē “Mani dokumenti”.
  2. Šifrē visus datus reģistrēto lietotāju mapē “Outlook”. Šī ir noklusējuma vieta, kurā Outlook 2000 un Outlook 2003 saglabā .pst un .ost failus.
  3. Visu izeju no skripta ievieto failā vēlākai kolekcijai. Fails var atrasties pie reģistrēta lietotāja lietotāja “Mani dokumenti”. Faila nosaukums būs% 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!
0

Līdzīgi raksti

Atstājiet savu komentāru