Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic
在目標資源上叫用指定網路配置檔的網路設定診斷會話。
語法
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic
-NetworkWatcher <PSNetworkWatcher>
-TargetResourceId <String>
[-VerbosityLevel <String>]
-Profile <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkConfigurationDiagnosticProfile]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic
-NetworkWatcherName <String>
-ResourceGroupName <String>
-TargetResourceId <String>
[-VerbosityLevel <String>]
-Profile <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkConfigurationDiagnosticProfile]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic
-Location <String>
-TargetResourceId <String>
[-VerbosityLevel <String>]
-Profile <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkConfigurationDiagnosticProfile]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic
-ResourceId <String>
-TargetResourceId <String>
[-VerbosityLevel <String>]
-Profile <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSNetworkConfigurationDiagnosticProfile]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Invoke-AzNetworkWatcherNetworkConfigurationDiagnostic Cmdlet 會針對目標資源上指定的網路配置檔叫用網路設定診斷會話。
範例
範例 1:針對 VM 和指定的網路配置檔叫用網路組態診斷會話
$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
},
參數
-AsJob
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Location
網路監看員的位置。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NetworkWatcher
網路監看員資源。
類型: | PSNetworkWatcher |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-NetworkWatcherName
網路監看員的名稱。
類型: | String |
別名: | Name |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Profile
網路組態診斷配置檔的清單。
類型: | List<T>[PSNetworkConfigurationDiagnosticProfile] |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
網路監看員資源群組的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceId
資源標識碼。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-TargetResourceId
要執行網路組態診斷的目標資源標識符。 有效選項包括 VM、NetworkInterface、VMSS/NetworkInterface 和應用程式閘道。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-VerbosityLevel
詳細資訊層級。 接受的值是 『Normal』、『Minimum』、『Full』。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
輸出
PSNetworkConfigurationDiagnosticResponse
備註
關鍵詞:azure, azurerm, arm, 資源, 管理, 管理員, 網路, 網路, 監看員, 診斷, 配置檔
相關連結
- New-AzNetworkWatcher
- Get-AzNetworkWatcher
- Remove-AzNetworkWatcher
- Get-AzNetworkWatcherNextHop
- Get-AzNetworkWatcherSecurityGroupView
- Get-AzNetworkWatcherTopology
- Start-AzNetworkWatcherResourceTroubleshooting
- New-AzNetworkWatcherPacketCapture
- New-AzPacketCaptureFilterConfig
- Get-AzNetworkWatcherPacketCapture
- Remove-AzNetworkWatcherPacketCapture
- Stop-AzNetworkWatcherPacketCapture
- New-AzNetworkWatcherProtocolConfiguration
- Test-AzNetworkWatcherIPFlow
- Test-AzNetworkWatcherConnectivity
- Stop-AzNetworkWatcherConnectionMonitor
- Start-AzNetworkWatcherConnectionMonitor
- Set-AzNetworkWatcherConnectionMonitor
- Set-AzNetworkWatcherConfigFlowLog
- Remove-AzNetworkWatcherConnectionMonitor
- New-AzNetworkWatcherConnectionMonitor
- Get-AzNetworkWatcherTroubleshootingResult
- Get-AzNetworkWatcherReachabilityReport
- Get-AzNetworkWatcherReachabilityProvidersList
- Get-AzNetworkWatcherFlowLogStatus
- Get-AzNetworkWatcherConnectionMonitorReport
- Get-AzNetworkWatcherConnectionMonitor