Disable-AzTrafficManagerProfile
Disables a Traffic Manager profile.
Syntax
Disable-AzTrafficManagerProfile
-Name <String>
-ResourceGroupName <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Disable-AzTrafficManagerProfile
-TrafficManagerProfile <TrafficManagerProfile>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Disable-AzTrafficManagerProfile cmdlet disables an Azure Traffic Manager profile. You can specify the profile object by using the pipeline or as a parameter value. Alternatively, you can specify the profile by using the Name and ResourceGroupName parameters.
Examples
Example 1: Disable a profile specified by name
Disable-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11"
This command disables the profile named ContosoProfile in ResourceGroup11. The command prompts you for confirmation.
Example 2: Disable a profile by using the pipeline
Get-AzTrafficManagerProfile -Name "ContosoProfile" -ResourceGroupName "ResourceGroup11" | Disable-AzTrafficManagerProfile -Force
This command gets the profile named ContosoProfile in ResourceGroup11. The command then passes that profile to the Disable-AzTrafficManagerProfile cmdlet by using the pipeline operator. That cmdlet disables that profile. The command specifies the Force parameter. Therefore, it does not prompt you for confirmation.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the Traffic Manager profile that this cmdlet disables.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Specifies the name of a resource group. This cmdlet disables a Traffic Manager profile in the group that this parameter specifies.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrafficManagerProfile
Specifies a TrafficManagerProfile object to disable. To obtain a TrafficManagerProfile object, use the Get-AzTrafficManagerProfile cmdlet.
Type: | TrafficManagerProfile |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |