Add-WssBackupTarget

Add-WssBackupTarget

Adds a backup target to a scheduled backup.

構文

Parameter Set: Default
Add-WssBackupTarget [-BackupPolicy] <ScheduledBackupPolicy> [-BackupTarget] <BackupTarget> [-Force] [ <CommonParameters>]

詳細説明

The Add-WssBackupTarget cmdlet adds a backup target to a scheduled backup policy. A scheduled backup policy is a backup file specification that has a backup schedule associated with it. When you add a backup target to the backup policy, the backup job adds the files in the backup policy that you specify to the new target location.

パラメーター

-BackupPolicy<ScheduledBackupPolicy>

Specifies the scheduled backup policy to which to add the backup target.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-BackupTarget<BackupTarget>

Specifies the backup target to add.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Force

ユーザーの確認を求めずにコマンドを強制的に実行します。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.WindowsServerSolutions.DataProtection.ServerBackup.ObjectModel.BackupTarget

    This cmdlet returns the list of backup targets.

Example 1: Add a backup target to a scheduled backup policy

This example adds a backup target to a backup policy.

The first command gets the current backup policy for the computer and stores it in the variable named $ContosoBUPolicy213.

The second command creates a new backup target from the volume on drive F: and stores it in the variable named $ContosoBUTarget05.

The third command adds the backup target that is stored in $ContosoBUTarget05 to the backup policy that is stored in $ContosoBUPolicy213.

PS C:\> $ContosoBUPolicy213 = Get-WssBackupPolicy
PS C:\> $ContosoBUTarget05 = New-WBBackupTarget –VolumePath "F:\"
PS C:\> Add-WssBackupTarget -BackupPolicy $ContosoBUPolicy213 -BackupTarget $ContosoBUTarget05

関連トピック

Get-WssBackupTarget

New-WssBackupTarget

Remove-WssBackupTarget