Come automatizzare la crittografia Microsoft EFS per Windows 7 XP o Vista
Qualche giorno fa dovevo creare una sceneggiatura checrittograferebbe le cartelle per i miei utenti finali al lavoro. Ho scritto il codice qui sotto e poi l'ho gettato in uno script di login che sarebbe poi stato eseguito mentre i miei utenti accedevano ai loro sistemi. Lo scopo della crittografia è proteggere i dati aziendali sensibili archiviati su desktop e laptop. Sebbene il processo abbia funzionato per me, ti consiglio di testarlo accuratamente prima di implementarlo!
Il codice seguente è un processo semplice che fa alcune cose:
- Crittografa tutti i dati nella cartella "Documenti" degli utenti che hanno effettuato l'accesso.
- Crittografa tutti i dati nella cartella "Outlook" degli utenti che hanno effettuato l'accesso. Questa è la posizione predefinita Outlook 2000 e Outlook 2003 memorizza i file .pst e .ost.
- Pipa tutto l'output dello script in un file per la successiva raccolta. Il file può trovarsi sotto "I miei documenti" dell'utente che ha effettuato l'accesso. Il file si chiamerà% nomecomputer% .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!
lascia un commento