• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Gaming
    • Hardware
    • Internet
    • iOS
    • MacOS
    • Office
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About Technipages
Using PowerShell to Create Azure NSGs

Using PowerShell to Create Azure NSGs

By Mona Leave a Comment

Powershell was introduced in November 2006 to replace the old “command prompt” and assist users with “task automation and configuration management,” on multiple platforms – Windows, macOs, or Linux (Parchisanu). The newest version, Powershell 7, was released on March 4, 2020. To translate for those of us unfamiliar with tech jargon like “task automation and configuration management,” Powershell is a program that allows the user to easily program their computer to complete simple administrative tasks or manage a network.

What is Azure

Azure is a group of cloud services released by Microsoft in October 2008, and its most recent version was released this month on May 4, 2020. Just as important, Microsoft introduced Azure Powershell AZ in May 2019 in order to make Azure compatible with Powershell on all platforms, rather than Windows only. By combining the two, Microsoft has increased the flexibility and ease of computer programming and administration for those who work with multiple platforms. This is especially handy if you need to set up, modify, or remove a network security group (NSG).

Setting Up an NSG

To manage your NSGs using Azure PowershellAZ you will need to have an Azure account. Don’t worry though, if you don’t have a subscription already, you can get one for free at Azure.Microsoft.com. Just be sure that the account you are using has been assigned a network contributor or other custom role with permissions set to allow it to make changes. Microsoft Azure’s website provides the following simple instructions for setting up an NSG:

Step 1

How you begin depends on how you are accessing Azure.

  • Portal users: Sign in to the Azure portal with your Azure account.
  • PowerShell users: Either run the commands in the Azure Cloud Shell, or run PowerShell from your computer. In the ‘Azure Cloud Shell’ browser tab, find the ‘Select Environment’ dropdown list, then pick ‘PowerShell’ if it isn’t already selected.
  • If you’re running PowerShell locally, use Azure PowerShell module version 1.0.0 or later. Run ‘Get-Module -ListAvailable Az.Network’ to find the installed version. If you need to upgrade, you will need to install the Azure PowerShell module first. Run ‘Connect-AzAccount’ to create a connection with Azure.
  • Azure Command-line interface (CLI) users: Either run the commands in the Azure Cloud Shell, or run the CLI from your computer. Use Azure CLI version 2.0.28 or later if you’re running the Azure CLI locally. Run “AZ –version” to find the installed version. If you need to, install or upgrade the most recent version. Run “AZ login” to create a connection with Azure.

Step 2

Choose “Create a Resource” from either the Azure portal or “Home” page. Next, choose “Networking”, and then “Network Security Group.” On the “Create Network Security Group” page, select the “Basics” tab and then choose your values for the following:

  • Subscription: Choose the subscription you prefer.
  • Resource Group: Create a new or choose an established resource group.
  • Name: Enter a unique text string in a resource group.
  • Region: Choose your desired location.

Step 3

Finally, choose “Review & Create.” When the “Validation Passed” message pops up, choose “Create” (Azure). You’re done!

Now that you’ve set up your NSG you can use Powershell and Azure to monitor your NSGs, use its diagnostic tools to troubleshoot errors, and set up and manage security rules. Microsoft even has a handy series of articles available on their website to help you get the most out of Powershell and Azure’s cloud platform. With these two programs you can move past the old command prompt, and into modern day computer administration.

You Might Also Like

  • PowerShell: Get Old AD DNS Records
    PowerShell: Get Old AD DNS Records
  • How to Set PowerShell Execution Policy
    How to Set PowerShell Execution Policy
  • Fix: Windows Cannot Find Powershell.exe
    Fix: Windows Cannot Find Powershell.exe
  • 7 Ways to Open PowerShell in Windows 10
    7 Ways to Open PowerShell in Windows 10
  • How to Remove Windows 10 Bloatware With PowerShell
    How to Remove Windows 10 Bloatware With PowerShell
  • Fix: PowerShell.exe Is Not a Microsoft-Verified Application
    Fix: PowerShell.exe Is Not a Microsoft-Verified Application
  • Teams: Manage External Access With PowerShell
    Teams: Manage External Access With PowerShell
  • PowerShell: Check When User Last Set Active Directory Password
    PowerShell: Check When User Last Set Active Directory…
  • Fix "Access to the registry key is denied" Error When Setting Policy For PowerShell Scripts
    Fix "Access to the registry key is denied" Error When…

Filed Under: Windows Tagged With: PowerShell

Reader Interactions

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • How to Add a Hyperlink in Excel
  • What Are The Different Types Of DDR?
  • What Is Non-Volatile Memory?
  • SATA: What It Is and What You Need to Know
  • SLC vs MLC vs TLC vs QLC vs PLC
  • What is SLC Caching?
  • What Is Host Memory Buffer (HMB) in SSD?
  • DRAM on an SSD: Is It Something You want?

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

© Copyright 2022 Technipages · All Rights Reserved · Privacy