Set-OBPolicy

Sets the OBPolicy object as the backup policy that will be used for scheduled backups.

Syntax

Set-OBPolicy
   [-Policy] <CBPolicy>
   [-Confirm]
   [-WhatIf]

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.

ps_mob_user_group_remark

Examples

EXAMPLE 1

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

This example sets a new mob_name_1 policy for a server.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Policy

Specifies the current OBPolicy object be set as the active backup policy for the server.

Type:CBPolicy
Position:2
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Internal.CloudBackup.Commands.OBPolicy

Outputs

Microsoft.Internal.CloudBackup.Commands.OBPolicy

This cmdlet sets the OBPolicy object as the backup policy to use for scheduled backups.