Set-AzureTrafficManagerProfile
Set-AzureTrafficManagerProfile
Updates an Azure Traffic Manager profile.
Syntax
Parameter Set: Default
Set-AzureTrafficManagerProfile -TrafficManagerProfile <TrafficManagerProfile> [-Profile <AzureProfile> ] [ <CommonParameters>]
Detailed Description
The Set-AzureTrafficManagerProfile cmdlet updates an Azure Traffic Manager profile. This cmdlet updates the settings of the profile from a local profile object. You can pass a profile object to Traffic Manager by using the pipeline or as a parameter value.
Parameters
-Profile<AzureProfile>
Specifies an Azure profile.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-TrafficManagerProfile<TrafficManagerProfile>
Specifies a local TrafficManagerProfile object. This cmdlet updates Traffic Manager to match this local object.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true(ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Microsoft.Azure.Commands.Network.TrafficManagerProfile
You can pipe a TrafficManagerProfile object to this cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.Azure.Commands.Network.TrafficManagerProfile
This cmdlet returns a TrafficManagerProfile object.
Examples
Example 1: Update a profile
The first command gets an Azure Traffic Manager profile by using the Get-AzureTrafficManagerProfile cmdlet. The command stores the profile locally in the $TrafficManagerProfile variable. After you get that profile, you can change it locally.
The second command updates the Traffic Manager profile named ContosoProfile to match the local value in $TrafficManagerProfile.
PS C:\> $TrafficManagerProfile = Get-AzureTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
PS C:\> Set-AzureTrafficManagerProfile -TrafficManagerProfile $TrafficManagerProfile
Related topics
Get-AzureTrafficManagerProfile