Set-NtfsSecurity
PackageDeployment Module Help |
Package Deployment Module |
Set-NtfsSecurity Cmdlet |
Version 4.0.0.5 |
Set-NtfsSecurity
Synopsis
Change NTFS Permissions on NTFS Partitions
Syntax
Set-NtfsSecurity [-Path] <String> [[-Files] <String>] [[-Mode] <String>] [-ContinueOnError] [-KeepInherited] [-SetDirectory] [-SetFiles] [-SetSubDirectories] [-Wow64] [[-AccountRights] <String[]>] [[-Context] <String>] [<CommonParameters>]
Description
Use this command to change the access permissions at directory and file level in NTFS partitions for local drives and shared network directories.
Parameters
-AccountRights <String[]> |
||||||
Enter the users or groups in this list you want to add to, remove from or replace in the access permissions. |
||||||
|
-Context <String> |
||||||
User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user. |
||||||
|
-ContinueOnError <SwitchParameter> |
||||||
Continues script execution in spite of errors in the respective command |
||||||
|
-Files <String> |
||||||
In the Files text box you can enter the required file specifications. |
||||||
|
-KeepInherited <SwitchParameter> |
||||||
Leaves the permissions for all newly created files (file inherit ACE) of the selected directory as is, regardless of the new directory permissions (container ACE). |
||||||
|
-Mode <String> |
||||||
Reset: Use this option to add the entries from the user and group list to the existing access permissions. If a user or a group already has an inherited access permission, the system changes it to a local access permission. All of the other inherited access permissions are changed accordingly to local access permissions. |
||||||
|
-Path <String> |
||||||
Specify the name of the directory you want to change the access permissions. |
||||||
|
-SetDirectory <SwitchParameter> |
||||||
Changes the access permissions at directory level. The changes have no effect on the access permissions of existing files. |
||||||
|
-SetFiles <SwitchParameter> |
||||||
Changes the access permissions at file level. |
||||||
|
-SetSubDirectories <SwitchParameter> |
||||||
Changes the access permissions of all subdirectories. |
||||||
|
-Wow64 <SwitchParameter> |
||||||
By default, the PackageDeployment module assumes to run in a 64-bit PowerShell process on 64-bit systems, and therefore defaults to the 64-bit application location (if different from the 32-bit application location) for file and registry accesses. If you want to access the 32-bit counterparts (in the file system %WinDir%\SysWOW64 instead of %WinDir%\System32, in the registry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node instead of HKEY_LOCAL_MACHINE\SOFTWARE), use the -Wow64 switch. |
||||||
|
<CommonParameters> |
For more information about common parameters, type "Get-Help about_CommonParameters". |