< Back

Get-AzureRmNetworkWatcherSecurityGroupView

Tue Jan 29, 2019 9:54 pm

NAME Get-AzureRmNetworkWatcherSecurityGroupView



SYNOPSIS

View the configured and effective network security group rules applied on a VM.





SYNTAX

Get-AzureRmNetworkWatcherSecurityGroupView [-AsJob] [-DefaultProfile <IAzureContextContainer>] -NetworkWatcher <PSNetworkWatcher>

-TargetVirtualMachineId <String> [<CommonParameters>]



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

<String> -TargetVirtualMachineId <String> [<CommonParameters>]





DESCRIPTION

The Get-AzureRmNetworkWatcherSecurityGroupView enables you to view the configured and effective network security group rules applied on a VM.





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



-TargetVirtualMachineId <String>

The target VM 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.PSViewNsgRules







NOTES





Keywords: azure, azurerm, arm, resource, management, manager, network, networking, network watcher, flow, ip



--- Example 1: Make a Security Group View call on a VM ---



$nw = Get-AzurermResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }

$networkWatcher = Get-AzureRmNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName

$VM = Get-AzurermVM -ResourceGroupName ContosoResourceGroup -Name VM0

Get-AzureRmNetworkWatcherSecurityGroupView -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id



In the above example, we first get the regional Network Watcher, then a VM in the region. Then we make a Security Group View call on the

specified VM.







RELATED LINKS

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

New-AzureRmNetworkWatcher

Get-AzureRmNetworkWatcher

Remove-AzureRmNetworkWatcher

Test-AzureRmNetworkWatcherIPFlow

Get-AzureRmNetworkWatcherNextHop

Get-AzureRmNetworkWatcherTopology

Start-AzureRmNetworkWatcherResourceTroubleshooting

New-AzureRmNetworkWatcherPacketCapture

New-AzureRmPacketCaptureFilterConfig

Get-AzureRmNetworkWatcherPacketCapture

Remove-AzureRmNetworkWatcherPacketCapture

Stop-AzureRmNetworkWatcherPacketCapture