Backup-ACL
Backs up the security descriptor of an item.
Syntax
Default (Default)
Backup-ACL
    [-Path] <String>
    [-DestinationPath] <String>
    [-LogPath] <String>
    [[-ScheduleTrigger] <Object>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Description
The Backup-Acl cmdlet backs up the security descriptor of a specified item, such as a file or a registry key.
To back up an ACL, specify the Path parameter to identify the item. Use the DestinationPath parameter to specify the location for the backup.
Examples
Example 1: Back up the ACL for a file
Backup-ACL -Path "C:\file01.txt" -DestinationPath "C:\AclBackups\file01.xml" -LogPath "C:\AclBackupLogs\"
This command backs up the ACL for the specified file. The command also specifies the location for the backup and the log.
Example 2: Back up on a schedule
$TaskTrigger = New-ScheduledTaskTrigger -Daily -At 6am
Backup-ACL -Path "C:\file02.txt" -DestinationPath "C:\AclBackups\" -LogPath "C:\AclBackups\" -ScheduleTrigger $TaskTrigger
This example backs up the ACL on a regular schedule.
The first command creates a scheduled task trigger by using the New-ScheduledTaskTrigger cmdlet and stores it in the $TaskTrigger variable.
The second command backs up the ACL according to the schedule object, in this case, daily at 6:00 AM.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter | 
| Default value: | None | 
| Supports wildcards: | False | 
| DontShow: | False | 
| Aliases: | cf | 
Parameter sets
(All)
| Position: | Named | 
| Mandatory: | False | 
| Value from pipeline: | False | 
| Value from pipeline by property name: | False | 
| Value from remaining arguments: | False | 
-DestinationPath 
		Specifies a full path to store the permission backup.
Parameter properties
| Type: | String | 
| Default value: | None | 
| Supports wildcards: | False | 
| DontShow: | False | 
Parameter sets
(All)
| Position: | 1 | 
| Mandatory: | True | 
| Value from pipeline: | True | 
| Value from pipeline by property name: | False | 
| Value from remaining arguments: | False | 
-LogPath 
		Specifies a full path for the log file.
Parameter properties
| Type: | String | 
| Default value: | None | 
| Supports wildcards: | False | 
| DontShow: | False | 
Parameter sets
(All)
| Position: | 2 | 
| Mandatory: | True | 
| Value from pipeline: | True | 
| Value from pipeline by property name: | False | 
| Value from remaining arguments: | False | 
-Path
Specifies the full path of the object for which the cmdlet backs up permissions.
Parameter properties
| Type: | String | 
| Default value: | None | 
| Supports wildcards: | False | 
| DontShow: | False | 
Parameter sets
(All)
| Position: | 0 | 
| Mandatory: | True | 
| Value from pipeline: | True | 
| Value from pipeline by property name: | False | 
| Value from remaining arguments: | False | 
-ScheduleTrigger 
		Specifies a ScheduleTrigger object. A trigger creates pipeline runs periodically, on schedule.
Parameter properties
| Type: | Object | 
| Default value: | None | 
| Supports wildcards: | False | 
| DontShow: | False | 
Parameter sets
(All)
| Position: | 3 | 
| Mandatory: | False | 
| Value from pipeline: | True | 
| Value from pipeline by property name: | False | 
| Value from remaining arguments: | False | 
-WhatIf 
		Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter | 
| Default value: | None | 
| Supports wildcards: | False | 
| DontShow: | False | 
| Aliases: | wi | 
Parameter sets
(All)
| Position: | Named | 
| Mandatory: | False | 
| Value from pipeline: | False | 
| Value from pipeline by property name: | False | 
| Value from remaining arguments: | False | 
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.