Set-AzNetworkWatcherFlowLog
Uppdaterar flödesloggresursen.
Syntax
Set-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-Location <String>
-Name <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-ResourceId <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-ResourceId <String>
-TargetResourceId <String>
-StorageId <String>
[-EnabledFilteringCriteria <String>]
-Enabled <Boolean>
[-EnableRetention <Boolean>]
[-RetentionPolicyDays <Int32>]
[-FormatType <String>]
[-UserAssignedIdentityId <String>]
[-FormatVersion <Int32>]
[-EnableTrafficAnalytics]
[-TrafficAnalyticsWorkspaceId <String>]
[-TrafficAnalyticsInterval <Int32>]
[-Tag <Hashtable>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzNetworkWatcherFlowLog
-InputObject <PSFlowLogResource>
[-UserAssignedIdentityId <String>]
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Uppdaterar flödesloggresursen.
Exempel
Exempel 1
$flowLog = Get-AzNetworkWatcherFlowLog -Location eastus -Name pstest
$flowLog.Enabled = $true
$flowLog.Format.Version = 2
$flowLog | Set-AzNetworkWatcherFlowLog -Force
Name : pstest
Id : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/NetworkWatcherRG/provid
ers/Microsoft.Network/networkWatchers/NetworkWatcher_eastus/FlowLogs/pstest
Etag : W/"e939e1e6-1509-4d7a-9e89-1ea532f6f222"
ProvisioningState : Succeeded
Location : eastus
TargetResourceId : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/MyFlowLog/provide
rs/Microsoft.Network/networkSecurityGroups/MyNSG
StorageId : /subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/FlowLogsV2Demo/provider
s/Microsoft.Storage/storageAccounts/MyStorage
Enabled : True
RetentionPolicy : {
"Days": 0,
"Enabled": false
}
Format : {
"Type": "JSON",
"Version": 2
}
FlowAnalyticsConfiguration : {}
Exempel 2
Uppdaterar flödesloggresursen. (automatiskt genererad)
Set-AzNetworkWatcherFlowLog -Enabled $true -Name 'cert01' -NetworkWatcherName nw1 -ResourceGroupName myresourcegroup -StorageId /subscriptions/00000000-0000-0000-0000-00000000000000000/resourceGroups/FlowLogsV2Demo/providers/Microsoft.Storage/storageAccounts/MyStorage -TargetResourceId <String>
Parametrar
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Enabled
Flagga för att aktivera/inaktivera flödesloggning.
Typ: | Boolean |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-EnabledFilteringCriteria
Valfritt fält för att filtrera nätverkstrafikloggar.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-EnableRetention
Flagga för att aktivera/inaktivera kvarhållning.
Typ: | Nullable<T>[Boolean] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-EnableTrafficAnalytics
Flagga för att aktivera/inaktivera TrafficAnalytics
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Force
Be inte om bekräftelse om du vill skriva över en resurs
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-FormatType
Filtypen för flödesloggen. Det enda värde som stöds nu är "JSON".
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-FormatVersion
Version (revision) av flödesloggen.
Typ: | Nullable<T>[Int32] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-InputObject
Flödeslobobjekt.
Typ: | PSFlowLogResource |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-Location
Plats för nätverksbevakaren.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Name
Flödesloggens namn.
Typ: | String |
Alias: | FlowLogName |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-NetworkWatcher
Nätverksbevakarresursen.
Typ: | PSNetworkWatcher |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-NetworkWatcherName
Namnet på nätverksbevakaren.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceGroupName
Namnet på resursgruppen network watcher.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-ResourceId
FlowLog-resurs-ID.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-RetentionPolicyDays
Antal dagar för att behålla flödesloggposter.
Typ: | Nullable<T>[Int32] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-StorageId
ID för lagringskontot som används för att lagra flödesloggen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Tag
En hashtable som representerar resurstaggar.
Typ: | Hashtable |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TargetResourceId
ID för den nätverkssäkerhetsgrupp som flödesloggen ska tillämpas på.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TrafficAnalyticsInterval
Intervallet i minuter som avgör hur ofta TA-tjänsten ska utföra flödesanalyser.
Typ: | Nullable<T>[Int32] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-TrafficAnalyticsWorkspaceId
Resurs-ID för den anslutna arbetsytan.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-UserAssignedIdentityId
ResourceId för den användartilldelade identitet som ska tilldelas flowlog.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten kördes. Cmdleten körs inte.
Typ: | SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
Indata
Utdata
Relaterade länkar
- 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
- New-AzNetworkWatcherFlowLog
- Get-AzNetworkWatcherFlowLog
- Remove-AzNetworkWatcherFlowLog
Azure PowerShell