< Back

Get-AzureRmNetworkWatcherFlowLogStatus

Tue Jan 29, 2019 9:54 pm

NAME Get-AzureRmNetworkWatcherFlowLogStatus



SYNOPSIS

Gets the status of flow logging on a resource.





SYNTAX

Get-AzureRmNetworkWatcherFlowLogStatus [-AsJob] [-DefaultProfile <IAzureContextContainer>] -NetworkWatcher <PSNetworkWatcher> -TargetResourceId

<String> [<CommonParameters>]



Get-AzureRmNetworkWatcherFlowLogStatus [-AsJob] [-DefaultProfile <IAzureContextContainer>] -NetworkWatcherName <String> -ResourceGroupName

<String> -TargetResourceId <String> [<CommonParameters>]





DESCRIPTION

The Get-AzureRmNetworkWatcherFlowLogStatus cmdlet Gets the status of flow logging on a resource. The status includes whether or not flow logging

is enabled for the resource provided, the configured storage account to send logs, and the retention policy for the logs. Currently Network

Security Groups are supported for flow logging.





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NetworkWatcher <PSNetworkWatcher>

The network watcher resource.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-NetworkWatcherName <String>

The name of network watcher.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ResourceGroupName <String>

The name of the network watcher resource group.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetResourceId <String>

The target resource ID.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.Network.Models.PSNetworkWatcher

System.String





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSFlowLog







NOTES





Keywords: azure, azurerm, arm, resource, management, manager, network, networking, watcher, flow, logs, flowlog, logging



--- Example 1: Get the Flow Logging Status for a Specified NSG ---



PS C:\\> $NW = Get-AzurermNetworkWatcher -ResourceGroupName NetworkWatcherRg -Name NetworkWatcher_westcentralus

PS C:\\> $nsg = Get-AzureRmNetworkSecurityGroup -ResourceGroupName NSGRG -Name appNSG



PS C:\\> Get-AzureRmNetworkWatcherFlowLogStatus -NetworkWatcher $NW -TargetResourceId $nsg.Id



TargetResourceId :

/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/NSGRG/providers/Microsoft.Network/networkSecurityGroups/appNSG

Properties : {

"Enabled": true,

"RetentionPolicy": {

"Days": 0,

"Enabled": false

},

"StorageId":

"/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/NSGRG/providers/Microsoft.Storage/storageAccounts/contosostorageacct123"

}



In this example we get the flow logging status for a Network Security Group. The specified NSG has flow logging enabled, and no retention policy

set.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... wlogstatus

Set-AzureRmNetworkWatcherConfigFlowLog

New-AzureRmNetworkWatcher

Get-AzureRmNetworkWatcher

Remove-AzureRmNetworkWatcher

New-AzureRmNetworkWatcherPacketCapture

New-AzureRmPacketCaptureFilterConfig

Get-AzureRmNetworkWatcherPacketCapture

Remove-AzureRmNetworkWatcherPacketCapture

Stop-AzureRmNetworkWatcherPacketCapture

Test-AzureRmNetworkWatcherIPFlow

Get-AzureRmNetworkWatcherNextHop

Get-AzureRmNetworkWatcherSecurityGroupView

Get-AzureRmNetworkWatcherTopology

Start-AzureRmNetworkWatcherResourceTroubleshooting

Get-AzureRmNetworkWatcherTroubleshootingResult