次の方法で共有


Set-AzTrafficManagerProfile

Traffic Manager プロファイルを更新します。

構文

Default (既定)

Set-AzTrafficManagerProfile
    -TrafficManagerProfile <TrafficManagerProfile>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

説明

Set-AzTrafficManagerProfile コマンドレットは、Azure Traffic Manager プロファイルを更新します。 このコマンドレットは、ローカル プロファイル オブジェクトからプロファイルの設定を更新します。 TrafficManagerProfile パラメーターを使用するか、パイプラインを使用して、プロファイル オブジェクトを指定できます。

Get-AzTrafficManagerProfile コマンドレットを使用して、プロファイルを表すローカル オブジェクトを取得できます。 オブジェクトをローカルで変更し、 Set-AzTrafficManagerProfile を使用して変更をコミットします。

例 1: プロファイルを更新する

$TrafficManagerProfile = Get-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
$TrafficManagerProfile.ProfileStatus = "Disabled"
Set-AzTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile

最初のコマンドは、Get-AzTrafficManagerProfile コマンドレットを使用して Azure Traffic Manager プロファイルを取得します。 このコマンドは、プロファイルを $TrafficManagerProfile 変数にローカルに格納します。

2 番目のコマンドは、そのプロファイルをローカルで変更します。 このコマンドを実行すると、プロファイルが無効になります。

3 番目のコマンドは、ContosoProfile という名前の Traffic Manager プロファイルを更新して、$TrafficManagerProfileのローカル値と一致させます。

パラメーター

-DefaultProfile

Azure との通信に使用される資格情報、アカウント、テナント、サブスクリプション。

パラメーターのプロパティ

型:IAzureContextContainer
規定値:None
ワイルドカードのサポート:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-TrafficManagerProfile

ローカル TrafficManagerProfile オブジェクトを 指定します。 このコマンドレットは、このローカル オブジェクトに一致するように Traffic Manager を更新します。

パラメーターのプロパティ

型:TrafficManagerProfile
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:True
パイプラインからの値:True
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

このコマンドレットでは、一般的なパラメーター -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction、-WarningVariable の各パラメーターがサポートされています。 詳細については、about_CommonParametersを参照してください。

入力

TrafficManagerProfile

出力

TrafficManagerProfile