Get-VBRAzureNetworkSecurityGroup

Short Description

Returns Microsoft Azure security groups.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus

Syntax

This cmdlet provides parameter sets that allow you to:

  • Get all Microsoft Azure security groups.

Get-VBRAzureNetworkSecurityGroup -Subscription <VBRAzureSubscription>  [<CommonParameters>]

  • Get Microsoft Azure security groups by its ID.

Get-VBRAzureNetworkSecurityGroup -Subscription <VBRAzureSubscription> [-Id <string>]  [<CommonParameters>]

  • Get Microsoft Azure security groups by its Name.

Get-VBRAzureNetworkSecurityGroup -Subscription <VBRAzureSubscription> [-Name <string[]>]  [<CommonParameters>]

Detailed Description

This cmdlet returns Microsoft Azure security groups.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Subscription

Specifies subscriptions associated with a Microsoft Azure account.

Accepts the VBRAzureSubscription object. To create this object, run the Get-VBRAzureSubscription cmdlet.

True

Named

True

(ByValue, ByPropertyName)

Id

Specifies Microsoft Azure security groups ID. The cmdlet will return security groups with the specified ID.

String

False

Named

False

Name

Specifies an array of Microsoft Azure security groups names. The cmdlet will return security groups with the specified names.

String[]

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Output Object

The cmdlet returns the VBRAzureNetworkSecurityGroup object that contains settings of Microsoft Azure security groups.

Examples

Get-VBRAzureNetworkSecurityGroupExample 1. Getting all Microsoft Azure Security Groups

This example shows how to get all security groups that are available in Microsoft Azure.

$account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com"

$subscription = Get-VBRAzureSubscription -Account $account

Get-VBRAzureNetworkSecurityGroup -Subscription $subscription

Perform the following steps:

  1. Run the Get-VBRAzureAccount cmdlet. Specify the necessary parameters. Save the result to the $account variable.
  2. Run the Get-VBRAzureSubscription cmdlet. Set the $account variable as the Account parameter value. Save the result to the $subscription variable.
  3. Run the Get-VBRAzureNetworkSecurityGroup cmdlet. Set the $subscription variable as the Subscription parameter value.

Get-VBRAzureNetworkSecurityGroupExample 2. Getting Microsoft Azure Security Groups by ID

This example shows how to get the 374e0811-161e-4878-bc05-2ecba95fe4bd Microsoft Azure security group.

$account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com"

$subscription = Get-VBRAzureSubscription -Account $account

Get-VBRAzureNetworkSecurityGroup -Subscription $subscription -ID "374e0811-161e-4878-bc05-2ecba95fe4bd"

Perform the following steps:

  1. Run the Get-VBRAzureAccount cmdlet. Specify the necessary parameters. Save the result to the $account variable.
  2. Run the Get-VBRAzureSubscription cmdlet. Set the $account variable as the Account parameter value. Save the result to the $subscription variable.
  3. Run the Get-VBRAzureNetworkSecurityGroup cmdlet. Set the $subscription variable as the Subscription parameter value. Specify the ID parameter value.

Get-VBRAzureNetworkSecurityGroupExample 3. Getting Microsoft Azure Security Groups by Name

This example shows how to get the Security Group 2000 Microsoft Azure security group.

$account = Get-VBRAzureAccount -Type ResourceManager -Name "RestoreToAzureRM@Veeam.com"

$subscription = Get-VBRAzureSubscription -Account $account

Get-VBRAzureNetworkSecurityGroup -Subscription $subscription -Name "Security Group 2000"

Perform the following steps:

  1. Run the Get-VBRAzureAccount cmdlet. Specify the necessary parameters. Save the result to the $account variable.
  2. Run the Get-VBRAzureSubscription cmdlet. Set the $account variable as the Account parameter value. Save the result to the $subscription variable.
  3. Run the Get-VBRAzureNetworkSecurityGroup cmdlet. Set the $subscription variable as the Subscription parameter value. Specify the Name parameter value.

Related Commands

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.