New-AzNetworkWatcherNetworkConfigurationDiagnosticProfile
Creates a new network configuration diagnostic profile object.
This object is used to restrict the network configuration during a diagnostic session using the specified criteria.
Syntax
Default (Default)
New-AzNetworkWatcherNetworkConfigurationDiagnosticProfile
-Direction <String>
-Protocol <String>
-Source <String>
-Destination <String>
-DestinationPort <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzNetworkWatcherNetworkConfigurationDiagnosticProfile cmdlet creates a new diagnostic profile object.
This object is used to restrict the network configuration during a network configuration diagnostic session using the specified criteria.
Examples
Example 1: Invoke network configuration diagnostic session for VM and specified network profile
$profile = New-AzNetworkWatcherNetworkConfigurationDiagnosticProfile -Direction Inbound -Protocol Tcp -Source 10.1.1.4 -Destination * -DestinationPort 50
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic -Location eastus -TargetResourceId /subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/NwRgEastUS/providers/Microsoft.Compute/virtualMachines/vm1 -Profile $profile
Results : [
{
"Profile": {
"Direction": "Inbound",
"Protocol": "Tcp",
"Source": "10.1.1.4",
"Destination": "*",
"DestinationPort": "50"
},
"NetworkSecurityGroupResult": {
"SecurityRuleAccessResult": "Allow",
"EvaluatedNetworkSecurityGroups": [
{
"NetworkSecurityGroupId": "/subscriptions/61cc8a98-a8be-4bfe-a04e-0b461f93fe35/resourceGroups/clean
upservice/providers/Microsoft.Network/networkSecurityGroups/rg-cleanupservice-nsg1",
"MatchedRule": {
"RuleName": "UserRule_Cleanuptool-Allow-4001",
"Action": "Allow"
},
"RulesEvaluationResult": [
{
"Name": "UserRule_Cleanuptool-Allow-100",
"ProtocolMatched": true,
"SourceMatched": false,
"SourcePortMatched": true,
"DestinationMatched": true,
"DestinationPortMatched": false
},
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Destination
Traffic destination.
Accepted values are: '*', IP Address/CIDR, Service Tag.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-DestinationPort
Traffic destination port.
Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Direction
The direction of the traffic.
Accepted values are 'Inbound' and 'Outbound'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Protocol
Protocol to be verified on.
Accepted values are '*', TCP, UDP.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-Source
Traffic source.
Accepted values are '*', IP Address/CIDR, Service Tag.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs
Notes
Keywords: azure, azurerm, arm, resource, management, manager, network, networking, watcher, diagnostic, profile