external help file: SitecoreInstallFramework-help.xml
online version:
schema: 2.0.0
---
Sets file permissions for a path
Invoke-FilePermissionsTask [-Path] <String> [[-Rights] <PSObject[]>] [-WhatIf] [-Confirm] [<CommonParameters>]
Sets one or more file permissions for a given path.
File permissions are passed as an object with the following structure:
@{
User =
FileSystemRights =
AccessControlType =
InheritanceFlags =
PropagationFlags =
}
You can pass multiple rights objects at the same time.
PS C:\> $right = @{User = $env:username; FileSystemRights = 'Read','Write'}
PS C:\> Invoke-FilePermissionsTask -Path c:\examplepath -Rights $right
Gives the current user Read and Write permissions to the path c:\examplepath.
PS C:\> $right = @{User = $env:username; FileSystemRights = 'Read','Write'; InheritanceFlags = 'ContainerInherit','ObjectInherit'}
PS C:\> Invoke-FilePermissionsTask -Path c:\examplepath -Rights $right
Gives the current user Read and Write permissions to the path c:\examplepath and all its children.
The path to modify permissions.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The collection of rights to apply.
Type: PSObject[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).