PackageDeployment Module Help

Package Deployment Module (DSM eScript Commands)

Set-NtfsSecurity Cmdlet

Version 1.0.0.3

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.

Required

False

Position

3

Accepts pipeline input

False

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution with DSM Runtime Service.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
Computer: Execution with DSM Runtime Service; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

4

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-Files <String>

In the Files text box you can enter the required file specifications.
Enter a blank, a semi-colon, a dot or inverted commas to separate multiple file name specifications. Please also note the following: If the file name contains blanks or dots already each file name should be entered in inverted commas to guarantee exact identification.
If you want to specify individual permissions for files and directories separately, specify each permission using an individual command.

Required

False

Position

1

Accepts pipeline input

False

-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).

Required

False

Position

Named

Accepts pipeline input

False

-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.
Add: With this option you can add the entries from the user and group list to the local access permissions and/or change them. Inherited access permissions that already exist for a user or a group remain without being changed.
Remove: The permissions that exist for entries on the user or group list are removed from 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.
Set: The entries from the user and group list replace the existing access permissions completely.

Required

False

Position

2

Accepts pipeline input

False

-Path <String>

Specify the name of the directory you want to change the access permissions.

Required

True

Position

0

Accepts pipeline input

False

-SetDirectory <SwitchParameter>

Changes the access permissions at directory level. The changes have no effect on the access permissions of existing files.

Required

False

Position

Named

Accepts pipeline input

False

-SetFiles <SwitchParameter>

Changes the access permissions at file level.

Required

False

Position

Named

Accepts pipeline input

False

-SetSubDirectories <SwitchParameter>

Changes the access permissions of all subdirectories.

Required

False

Position

Named

Accepts pipeline input

False

-Wow64 <SwitchParameter>

For reasons of compatibilty, Ivanti DSM maps file and registry access to the default storage location for 32 bit applications (provided that the storage location differs from that of 64-bit applications). File access: whenever a 32-bit application attempts to access %windir%\System32, the access is redirected to %windir%\SysWOW64. Registry commands: when accessing HKEY_LOCAL_MACHINE\SOFTWARE the calls are redirected to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. The x64-switch stops this redirection of file and registry accesses when running the script command on a x64 computer; the eScript command runs on the specified path. CallScript command: the script runs in a 64-bit process.

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".