Set-WssBackupPolicy
Set-WssBackupPolicy
Creates or changes a scheduled backup policy.
Syntax
Parameter Set: Default
Set-WssBackupPolicy [-BackupPolicy] <ScheduledBackupPolicy> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-WssBackupPolicy command creates or changes a scheduled backup policy.
Parameters
-BackupPolicy<ScheduledBackupPolicy>
Specifies the scheduled backup policy to create or change.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Specify a scheduled backup policy
This example sets a scheduled backup policy as the current scheduled backup policy.
The first command gets the current backup policy for the computer and stores it in the $ContosoBUPolicy25 variable.
The second command adds 5:00 A.M. daily as a backup schedule for the backup policy stored in $ContosoBUPolicy25.
The third command sets the scheduled backup policy stored in $ContosoBUPolicy25 (including the new schedule) as the current scheduled backup policy.
PS C:\> $ContosoBUPolicy25 = Get-WssBackupPolicy
PS C:\> Add-WssBackupSchedule -BackupPolicy $ContosoBUPolicy25 -BackupTime 5:00
PS C:\> Set-WssBackupPolicy -BackupPolicy $ContosoBUPolicy25