New-AzNetworkWatcherConnectionMonitorObject
建立連線監視器 V2 物件。
語法
New-AzNetworkWatcherConnectionMonitorObject
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
[-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>]
[-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
[-Note <String>]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherConnectionMonitorObject
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
[-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>]
[-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
[-Note <String>]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherConnectionMonitorObject
-Location <String>
-Name <String>
[-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>]
[-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
[-Note <String>]
[-Tag <Hashtable>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
New-AzNetworkWatcherConnectionMonitorObject Cmdlet 會建立連線監視器 V2 物件。
範例
範例 1
$cmtest = New-AzNetworkWatcherConnectionMonitorObject -Location westcentralus -Name cmV2test -TestGroup $testGroup1, $testGroup2 -Tag @{"name" = "value"}
$cmtest
NetworkWatcherName : NetworkWatcher_westcentralus
ResourceGroupName : NetworkWatcherRG
Name : cmV2test
TestGroups : [
{
"Name": "testGroup1",
"Disable": false,
"TestConfigurations": [
{
"Name": "tcpTC",
"TestFrequencySec": 60,
"ProtocolConfiguration": {
"Port": 80,
"DisableTraceRoute": false
},
"SuccessThreshold": {
"ChecksFailedPercent": 20,
"RoundTripTimeMs": 5
}
},
{
"Name": "icmpTC",
"TestFrequencySec": 30,
"PreferredIPVersion": "IPv4",
"ProtocolConfiguration": {
"DisableTraceRoute": true
}
}
],
"Sources": [
{
"Name": "MultiTierApp0(IrinaRGWestcentralus)",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/RGW
estcentralus/providers/Microsoft.Compute/virtualMachines/MultiTierApp0"
},
{
"Name": "NPM-CommonEUS(er-lab)",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/er-lab/p
roviders/Microsoft.OperationalInsights/workspaces/NPM-CommonEUS",
"Filter": {
"Type": "Include",
"Items": [
{
"Type": "AgentAddress",
"Address": "SEA-Cust50-VM01"
},
{
"Type": "AgentAddress",
"Address": "WIN-P0HGNDO2S1B"
}
]
}
}
],
"Destinations": [
{
"Name": "bingEndpoint",
"Address": "bing.com"
},
{
"Name": "googleEndpoint",
"Address": "google.com"
}
]
},
{
"Name": "testGroup2",
"Disable": false,
"TestConfigurations": [
{
"Name": "httpTC",
"TestFrequencySec": 120,
"ProtocolConfiguration": {
"Port": 443,
"Method": "GET",
"RequestHeaders": [
{
"Name": "Allow",
"Value": "GET"
}
],
"ValidStatusCodeRanges": [
"2xx",
"300-308"
],
"PreferHTTPS": true
},
"SuccessThreshold": {
"ChecksFailedPercent": 20,
"RoundTripTimeMs": 30
}
}
],
"Sources": [
{
"Name": "MultiTierApp0(IrinaRGWestcentralus)",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/IrinaRGW
estcentralus/providers/Microsoft.Compute/virtualMachines/MultiTierApp0"
}
],
"Destinations": [
{
"Name": "googleEndpoint",
"Address": "google.com"
}
]
}
]
Outputs : null
Notes :
Tags : {
"name": "value"
}
參數
-Confirm
執行 Cmdlet 之前先提示您確認。
類型: | SwitchParameter |
別名: | cf |
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 |
-Name
線上監視器名稱。
類型: | String |
別名: | ConnectionMonitorName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NetworkWatcher
網路監看員資源。
類型: | PSNetworkWatcher |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-NetworkWatcherName
網路監看員的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Note
與連線監視器相關聯的附註。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Output
描述線上監視器輸出目的地。
類型: | PSNetworkWatcherConnectionMonitorOutputObject[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
網路監看員資源群組的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Tag
表示資源標記的哈希表。
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-TestGroup
測試群組的清單。
類型: | PSNetworkWatcherConnectionMonitorTestGroupObject[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
None