วิธีการเข้ารหัส Microsoft EFS โดยอัตโนมัติสำหรับ Windows 7 XP หรือ Vista

ไม่กี่วันที่ผ่านมาฉันต้องสร้างสคริปต์ที่จะเข้ารหัสโฟลเดอร์สำหรับผู้ใช้ของฉันในที่ทำงาน ฉันเขียนโค้ดด้านล่างแล้วโยนมันเป็นสคริปต์การเข้าสู่ระบบซึ่งจะทำงานเมื่อผู้ใช้ของฉันเข้าสู่ระบบของพวกเขา วัตถุประสงค์ของการเข้ารหัสคือเพื่อปกป้องข้อมูลสำคัญของ บริษัท ที่จัดเก็บไว้ในเดสก์ท็อปและแล็ปท็อป แม้ว่ากระบวนการนี้จะได้ผลสำหรับฉัน แต่ฉันขอแนะนำให้คุณทดสอบอย่างละเอียดก่อนการปรับใช้!

โค้ดด้านล่างเป็นกระบวนการง่ายๆที่ทำบางสิ่ง:

  1. เข้ารหัสข้อมูลทั้งหมดในโฟลเดอร์“ My Documents” ของผู้ใช้ที่ล็อกอิน
  2. เข้ารหัสข้อมูลทั้งหมดในโฟลเดอร์“ Outlook” ของผู้ใช้ที่เข้าสู่ระบบ นี่คือตำแหน่งเริ่มต้น Outlook 2000 และ Outlook 2003 เก็บไฟล์. pst และ. ost
  3. ไพพ์เอาต์พุตทั้งหมดจากสคริปต์ลงในไฟล์สำหรับการรวบรวมในภายหลัง ไฟล์ดังกล่าวจะอยู่ภายใต้ "เอกสารของฉัน" ของผู้ใช้ ไฟล์จะถูกเรียกว่า% 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!

วินโดว 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

บทความที่คล้ายกัน

ทิ้งข้อความไว้