Set-OBPolicy
Sets the OBPolicy object as the backup policy that will be used for scheduled backups.
構文
Default (既定)
Set-OBPolicy
[-Policy] <CBPolicy>
[-Confirm]
[-WhatIf]
説明
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 Microsoft Azure Backup cmdlets, the user needs to be an administrator on the protected machine.
例
EXAMPLE 1
$fspec = New-OBFileSpec -FileSpec C:\test\texttext1.txt
$rpolicy = New-OBRetentionPolicy
$sch = New-OBSchedule
New-OBPolicy | Add-OBFileSpec -FileSPec $fspec | Set-OBRetentionPolicy -RetentionPolicy $rpolicy | Set-OBSchedule -Schedule $sch | Set-OBPolicy
This example sets a new Microsoft Azure Backup policy for a server.
パラメーター
-Confirm
Prompts you for confirmation before running the cmdlet.
パラメーターのプロパティ
型: | SwitchParameter |
規定値: | False |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-Policy
Specifies the current OBPolicy object be set as the active backup policy for the server.
パラメーターのプロパティ
型: | CBPolicy |
規定値: | None |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | 2 |
必須: | True |
パイプラインからの値: | True |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
パラメーターのプロパティ
型: | SwitchParameter |
規定値: | False |
ワイルドカードのサポート: | False |
DontShow: | False |
パラメーター セット
(All)
配置: | Named |
必須: | False |
パイプラインからの値: | False |
プロパティ名別のパイプラインからの値: | False |
残りの引数からの値: | False |
入力
Microsoft.Internal.CloudBackup.Commands.OBPolicy
出力
Microsoft.Internal.CloudBackup.Commands.OBPolicy
This cmdlet sets the OBPolicy object as the backup policy to use for scheduled backups.