Quantcast
Channel: Tom Carpenter's Blog » windows 7
Viewing all articles
Browse latest Browse all 10

ICACLS Syntax for ACL Management

$
0
0


One of the great new tools in Windows Vista and Windows 7 is the ICACLS command line command. While I’m very annoyed with Microsoft for not supporting the old CACLS syntax and adding the features of ICACLS (all our old CACLS-based batch files break), I have to admit that a few capabilities are very welcome. One such capability is the function used to export and import ACLs from and into objects.

For example, imagine you are about to make several permission changes to a directory structure. You want to ensure you can revert to the current permission structure if you make mistakes. ICACLS allows you to quickly export the permissions for an entire directory structure with the /save switch.

The ICACLS syntax for ACL (or permission) export is as follows:

ICACLS folder_name* /save filename.acl /T

The /T switch is used to indicate that directory recursion should be used. The /save switch is used to export the results. For example, to save the permissions in a directory named HORSES on the C: drive and all subdirectories and folders, execute the following command:

ICACLS C:HORSES* /save horses.acl /T

The file, horses.acl, will contain the permissions in text format. Later, you can import the permissions with the /restore switch if required. To restore the permissions, execute the following ICACLS syntax:

ICACLS C:HORSES /restore horses.acl

Of course, the ICACLS command provides syntax for permission management as well as backing up and restoring the permissions; however, this new feature is one of the most important to know about. Hopefully, you find this information useful.


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images