Windows 7 Cipher options

Hi guys,

I’m busy with the 70-680 exam prep and i notice that a lot of effort is being done to let users understand the encryption options. Welli’ve listed all the option which can be used with the “Cipher” command.

Displays or alters the encryption of folders and files on NTFS volumes. Used without parameters, cipher displays the encryption state of the current folder and any files it contains.


cipher [{/e|/d}] [/s:dir] [/a] [/i] [/f] [/q] [/h] [/k] [/u[/n]] [PathName […]] | [/r:PathNameWithoutExtension] | [/w:PathName]


/e   : Encrypts the specified folders. Folders are marked so that files that are added to the folder later are encrypted too.

/d   : Decrypts the specified folders. Folders are marked so that files that are added to the folder later are encrypted too.

/s:   dir   : Performs the selected operation in the specified folder and all subfolders.

/a   : Performs the operation for files and directories.

/i   : Continues performing the specified operation even after errors occur. By default, cipher stops when it encounters an error.

/f   : Forces the encryption or decryption of all specified objects. By default, cipher skips files that have been encrypted or decrypted already.

/q   : Reports only the most essential information.

/h   : Displays files with hidden or system attributes. By default, these files are not encrypted or decrypted.

/k   : Creates a new file encryption key for the user running cipher. If you use this option, cipher ignores all of the other options.

/u   : Updates the user’s file encryption key or recovery agent’s key to the current ones in all of the encrypted files on local drives (that is, if the keys have been changed). This option only works with /n.

/n   : Prevents keys from being updated. Use this option to find all of the encrypted files on the local drives. This option only works with /u.

PathName   : Specifies a pattern, file, or folder.

/r: PathNameWithoutExtension   : Generates a new recovery agent certificate and private key, and then writes them to files with the file name specified in PathNameWithoutExtension. If you use this option, cipher ignores all of the other options.

/w: PathName   : Removes data on unused portions of a volume. PathName can indicate any directory on the desired volume. If you use this option, cipher ignores all of the other options.

/?   : Displays help at the command prompt.


  • Using /w /w removes data from portions of the volume it can access and have not been allocated to files or directories. It does not lock the drive, so other programs can obtain space on the drive, which cipher cannot erase. Because this option writes to a large portion of the hard volume, it might take a long time to complete and should only be used when necessary.
  • Encrypting or decrypting filesTo prevent an encrypted file from becoming decrypted when it is modified, it is recommended that you encrypt both the file and the folder in which it resides.
  • Using read-only files and foldersCipher cannot encrypt files that are marked as read-only.
  • Using multiple folder namesYou can use multiple folder names and wildcard characters.
  • Using multiple parametersYou must separate multiple parameters by at least one space.


To use cipher to encrypt a subfolder named May in a folder named MonthlyReports, type:

cipher /e monthlyreportsmay

To encrypt the MonthlyReports folder, the January through December subfolders, and the Manufacturing subfolders within the month subfolders, type:

cipher /e /s:monthlyreports

To encrypt only the Marketing.xls file in the May subfolder, type:

cipher /e /a monthlyreportsmaymarketing.xls

To encrypt the Marketing.xls file, the Maintenance.doc file, and the Manufacturing subfolder (located in the May folder), type:

cipher /e /a monthlyreportsmayma*

To determine whether the May folder is encrypted, type:

cipher monthlyreportsmay

To determine which files in the May folder are encrypted, type:

cipher monthlyreportsmay*

Formatting legend
Format Meaning
Italic Information that the user must supply
Bold Elements that the user must type exactly as shown
Ellipsis (…) Parameter that can be repeated several times in a command line
Between brackets ([]) Optional items
Between braces ({}); choices separated by pipe (|). Example: {even|odd} Set of choices from which the user must choose only one
Courier font Code or program output

2 thoughts on “Windows 7 Cipher options”

  1. In Windows 7, the /a and the /i parameters are not shown in the result of cipher /? which is strange. Any ideas on this?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.