Set-OBPolicy
Updated: April 4, 2013
Applies To: Windows Server 2012
Set-OBPolicy
Syntax
Parameter Set: Default Set-OBPolicy [-Policy] <CBPolicy> [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-OBPolicy cmdlet sets the specified OBPolicy object as the backup policy that will be used for scheduled backups.
This cmdlet supports the WhatIf and the Confirm parameters. The cmdlet prompts the user for confirmation by default. The WhatIf parameter gives a verbose description of what the cmdlet does without performing any operation. The Confirm parameter specifies whether the cmdlet should prompt the user. Specify –Confirm:$FALSE to override the prompt.
To use Windows Azure Backup cmdlets, the user must be a member of the Administrators group or Backup Operators group.
Parameters
-Policy<CBPolicy>
Specifies the current OBPolicy object be set as the active backup policy for the server.
|
Aliases |
none |
|
Required? |
true |
|
Position? |
2 |
|
Default Value |
none |
|
Accept Pipeline Input? |
True (ByValue) |
|
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.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.Internal.CloudBackup.Commands.OBPolicy
Outputs
The output type is the type of the objects that the cmdlet emits.
-
Microsoft.Internal.CloudBackup.Commands.OBPolicy
This cmdlet sets the OBPolicy object as the backup policy to use for scheduled backups.
Examples
EXAMPLE 1
This example sets a new Windows Azure Backup policy for a server.
PS C:\> $fspec = New-OBFileSpec –FileSpec C:\test\texttext1.txt
PS C:\> $rpolicy = New-OBRetentionPolicy
PS C:\> $sch = New-OBSchedule
PS C:\> New-OBPolicy | Add-OBFileSpec -FileSPec $fspec | Set-OBRetentionPolicy -RetentionPolicy $rpolicy | Set-OBSchedule -Schedule $sch | Set-OBPolicy
Related topics
