Wednesday, March 20, 2013

Powershell Script: Export EFS Certificates using Powershell.

Hi,
In my previous Article i post about how to create encrypted folder using powershell script. In encryption the most important thing is the backup of encryption certificate. We can export and save encryption certificate manually from control panel , using MMC and Certificate Snap-in or using cipher.exe.
But as we all love to use scripts , we can use a powershell scrip to export efs security certificate.

Download Link : http://gallery.technet.microsoft.com/scriptcenter/Export-EFS-Certificates-8ec8ba74

You can download the script and run it, this script will export the EFS Security Certificate to your “My Document” or “Document Folder”.
20-03-2013 00-04-05
I did not write this script, i have found it somewhere on the internet and lost is original source, and i also tweaked this script according to my need.

Download Link  :http://gallery.technet.microsoft.com/scriptcenter/Export-EFS-Certificates-8ec8ba74

Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, March 18, 2013

Powershell Script : Create An Encrypted Folder using Powershell.

Hi,

Windows Encryption is one of the best inbuilt security tool in windows7. My and my friends use windows encrypted file systems (EFS) a lot and may be you are using EFS in your windows environment.

Rather that create a whole DISK, My Documents, Desktop encrypted, I always prefer to create an encrypted folder somewhere on the disk and then put the files which you want to be encrypted in that encrypted folder.

I have written a small Powershell Script which created a encryption enabled folder on your desktop with folder name “Encrypted-Folder”.

You can download the script from this link http://gallery.technet.microsoft.com/scriptcenter/Create-Encrypted-Folder-6f0fe0c9

Script Logic
I have created a small flow charts on how this script works.
Encryption Script Sample
How it works.
  1. This script check for folder name “Encrypted-Folder” on your Desktop.
  2. If the Folder Exists.
    1. then it check if the attributes of the “Encrypted-Folder” is contains encrypted.
      1. If the Folder Attributes on “Encrypted-Folder”  contains “Encrypted”
      2. Then it won’t do anything.
      3. but
      4. If the Folder attributes doesn’t contains “Encrypted-Folder” 
      5. then
      6. it runs “cipher /e” command to make folder encrypted
  3. If the folder Does not exists,
    1. then this create a new folder “Encrypted-Folder”  on your desktop
    2. and encrypt it.
In this script i am using “cipher /e” to enable encryption. I have tested this script on windows7 and windows8 and it is working fine for me.
Screenshots.
18-03-2013 15-55-02
18-03-2013 16-15-19
18-03-2013 16-16-04

You can download the script from this link http://gallery.technet.microsoft.com/scriptcenter/Create-Encrypted-Folder-6f0fe0c9

That’s all for now.
Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007