Get-VBRAzureNetworkSecurityGroup

Short Description

Returns Microsoft Azure security groups.

Applies to

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides parameter sets that allow you to:

  • Get all Microsoft Azure security groups.

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

  • Get Microsoft Azure security groups by its ID.

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

  • Get Microsoft Azure security groups by its name.

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

Detailed Description

This cmdlet returns Microsoft Azure security groups.

Important

This cmdlet does not support Microsoft Azure accounts with the Azure Service Manager type of a subscription (ASM, also known as a "classic" type subscription).

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)

Location

Specifies a geographic location of the network security group.

Accepts the VBRAzureLocation object. To get this object, run the Get-VBRAzureLocation cmdlet.

False

Named

False

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 Microsoft Docs.

Output Object

VBRAzureNetworkSecurityGroup

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 Type and Name parameter values. 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 Type and Name parameter values. 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 Type and Name parameter values. 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

Page updated 3/1/2024

Page content applies to build 12.2.0.334