question

BrianNguyen-9575 avatar image
0 Votes"
BrianNguyen-9575 asked BrianNguyen-9575 commented

How to export NTFS permission by cmd using icacls

I dont want to export by powershell cause it is not exported exactly data (some users are lost)

Using Icacls by cmd is exported exactly that I have double-checked.

I tried but icacls export only folder or only one driver. It is also export the folder even it wasn't share.

Is there any one know how to export all shareholder from all driver (included C:\ D:\, etc,,,)

Thanks you

windows-server
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered BrianNguyen-9575 commented

Hi BrianNguyen-9575,

You can use the icacls.exe tool to export/import current NTFS directory permissions. To get all ACLs for a specific folder (including sub-directories and files), and export them to a text file, run the following command:

icacls g:\filename /save c:\backup\filename_ntfs_perms.txt /t /c

Note. /t key is used to get ACLs for all subdirectories and files, /c allows to ignore access errors. By adding /q option, you can disable the display of information about successful access to the file system objects.

Depending on the number of files and folders, the export of permissions can take quite a long time. After the command has been executed, the statistics on the number of successful or failed processing of files will be displayed.

Open the file filename_ntfs_perms.txt using any text editor. As you can see, it contains the full list of files and folders in a directory, and each item has the current permissions specified in SDDL (Security Descriptor Definition Language) format.




--If the reply is helpful, please Upvote and Accept as answer--

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

firstly Thanks for your help.

Actually It's not fully my question and my intention.
icacls g:\filename => This is only export from specific folder or specific driver.
=> My purpose is export all driver such as D: C: E: F: etc all partitions that server had.
If can export only sharefile(smbshare) so very useful, if can not nevermind I will filter.

Can you help me ? Im looking for your instruction.

0 Votes 0 ·