New-AzNetworkWatcherFlowLog
Dient zum Erstellen oder Aktualisieren einer Flussprotokollressource für die angegebene Netzwerksicherheitsgruppe.
Syntax
New-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Der Befehl "New-AzNetworkWatcherFlowLog" erstellt oder aktualisiert eine Flussprotokollressource für die angegebene Netzwerksicherheitsgruppe.
Beispiele
Beispiel 1
New-AzNetworkWatcherFlowLog -Location eastus -Name pstest -TargetResourceId /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/MyFlowLog/providers/Microsoft.Network/networkSecurityGroups/MyNSG -StorageId /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/FlowLogsV2Demo/providers/Microsoft.Storage/storageAccounts/MyStorage -Enabled $true -EnableRetention $true -RetentionPolicyDays 5 -FormatVersion 2 -EnableTrafficAnalytics -TrafficAnalyticsWorkspaceId /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourcegroups/flowlogsv2demo/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace
Name : pstest
Id : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/NetworkWatcherRG/provid
ers/Microsoft.Network/networkWatchers/NetworkWatcher_eastus/FlowLogs/pstest
Etag : W/"f6047360-d797-4ca6-a9ec-28b5aec5c768"
ProvisioningState : Succeeded
Location : eastus
TargetResourceId : /subscriptions/56abfbd6-ec72-4ce9-831f-bc2b6f2c5505/resourceGroups/MyFlowLog/provide
rs/Microsoft.Network/networkSecurityGroups/MyNSG
StorageId : /subscriptions/56abfbd6-ec72-4ce9-831f-bc2b6f2c5505/resourceGroups/FlowLogsV2Demo/provider
s/Microsoft.Storage/storageAccounts/MySTorage
Enabled : True
RetentionPolicy : {
"Days": 5,
"Enabled": true
}
Format : {
"Type": "JSON",
"Version": 2
}
FlowAnalyticsConfiguration : {
"networkWatcherFlowAnalyticsConfiguration": {
"enabled": true,
"workspaceId": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"workspaceRegion": "eastus",
"workspaceResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourcegr
oups/flowlogsv2demo/providers/Microsoft.OperationalInsights/workspaces/MyWorkspace",
"trafficAnalyticsInterval": 60
}
}
Beispiel 2
New-AzNetworkWatcherFlowLog -Location eastus -Name pstest -TargetResourceId /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/MyFlowLog/providers/Microsoft.Network/networkSecurityGroups/MyNSG -StorageId /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/FlowLogsV2Demo/providers/Microsoft.Storage/storageAccounts/MyStorage -Enabled $false -EnableTrafficAnalytics:$false
Name : pstest
Id : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/NetworkWatcherRG/provid
ers/Microsoft.Network/networkWatchers/NetworkWatcher_eastus/FlowLogs/pstest
Etag : W/"f6047360-d797-4ca6-a9ec-28b5aec5c768"
ProvisioningState : Succeeded
Location : eastus
TargetResourceId : /subscriptions/56abfbd6-ec72-4ce9-831f-bc2b6f2c5505/resourceGroups/MyFlowLog/provide
rs/Microsoft.Network/networkSecurityGroups/MyNSG
StorageId : /subscriptions/56abfbd6-ec72-4ce9-831f-bc2b6f2c5505/resourceGroups/FlowLogsV2Demo/provider
s/Microsoft.Storage/storageAccounts/MySTorage
Enabled : False
RetentionPolicy : {
"Days": 0,
"Enabled": false
}
Format : {
"Type": "JSON",
"Version": 1
}
FlowAnalyticsConfiguration : {
"networkWatcherFlowAnalyticsConfiguration": {
"enabled": false,
"trafficAnalyticsInterval": 60
}
}
Wenn Sie die FlowLog-Ressource deaktivieren möchten, für die TrafficAnalytics konfiguriert ist, müssen Sie auch TrafficAnalytics deaktivieren. Dies kann wie im Beispiel 2 erfolgen.
Parameter
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Enabled
Kennzeichnen, um die Ablaufprotokollierung zu aktivieren/deaktivieren.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableRetention
Kennzeichnen, um die Aufbewahrung zu aktivieren/zu deaktivieren.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableTrafficAnalytics
Flag zum Aktivieren/Deaktivieren von TrafficAnalytics
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Bitten Sie nicht um Bestätigung, wenn Sie eine Ressource überschreiben möchten
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FormatType
Der Dateityp des Flussprotokolls. Der einzige unterstützte Wert ist jetzt "JSON".
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FormatVersion
Die Version (Revision) des Ablaufprotokolls.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Location
Der Standort des Netzwerküberwachungs-Wächters.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Der Name des Flussprotokolls.
Type: | String |
Aliases: | FlowLogName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkWatcher
Die Netzwerküberwachungsressource.
Type: | PSNetworkWatcher |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NetworkWatcherName
Der Name der Netzwerküberwachung.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Der Name der Netzwerküberwachungsressourcengruppe.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RetentionPolicyDays
Anzahl der Tage, die Ablaufprotokolldatensätze beibehalten werden sollen.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageId
ID des Speicherkontos, das zum Speichern des Ablaufprotokolls verwendet wird.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
Eine Hashtabelle, die Ressourcentags darstellt.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetResourceId
ID der Netzwerksicherheitsgruppe, auf die das Ablaufprotokoll angewendet wird.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrafficAnalyticsInterval
Das Intervall in Minuten, das entscheiden würde, wie häufig der TA-Dienst Ablaufanalysen durchführen soll.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TrafficAnalyticsWorkspaceId
Ressourcen-ID des angefügten Arbeitsbereichs.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Ausgaben
Ähnliche Themen
- 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-AzNetworkWatcher Verbinden ivity
- Stop-AzNetworkWatcher Verbinden ionMonitor
- Start-AzNetworkWatcher Verbinden ionMonitor
- Set-AzNetworkWatcher Verbinden ionMonitor
- Set-AzNetworkWatcherConfigFlowLog
- Remove-AzNetworkWatcher Verbinden ionMonitor
- New-AzNetworkWatcher Verbinden ionMonitor
- Get-AzNetworkWatcherTroubleshootingResult
- Get-AzNetworkWatcherReachabilityReport
- Get-AzNetworkWatcherReachabilityProvidersList
- Get-AzNetworkWatcherFlowLogStatus
- Get-AzNetworkWatcher Verbinden ionMonitorReport
- Get-AzNetworkWatcher Verbinden ionMonitor
- Get-AzNetworkWatcherFlowLog
- Set-AzNetworkWatcherFlowLog
- Remove-AzNetworkWatcherFlowLog
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für