• Skip to main content
  • Skip to primary sidebar

Technipages

Smart phone, gadget and computer tutorials

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

Using PowerShell to Create Azure NSGs

Posted on May 26, 2020 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 RecordsPowerShell: Get Old AD DNS Records
  • How to Set PowerShell Execution PolicyHow to Set PowerShell Execution Policy
  • 7 Ways to Open PowerShell in Windows 107 Ways to Open PowerShell in Windows 10
  • PowerShell: Check When User Last Set Active Directory PasswordPowerShell: Check When User Last Set Active…
  • Fix "Access to the registry key is denied" Error When Setting Policy For PowerShell ScriptsFix "Access to the registry key is denied" Error…
  • How to Create a VPN on MacHow to Create a VPN on Mac
  • How to Create an Apple IDHow to Create an Apple ID
  • How to Create Your Own Theme in TelegramHow to Create Your Own Theme in Telegram
  • YouTube: How to Create a PlaylistYouTube: How to Create a Playlist

Filed Under: Windows Tagged With: PowerShell

Reader Interactions

Did this help? Let us know! Cancel reply

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

  • Slack: How To Change Your Time Zone
  • Slack: How To Change Your Profile Picture
  • Troubleshooting Zoom Rooms Error 13003
  • Fix Microsoft Sudoku Not Saving Progress
  • Microsoft Teams Not Compatible with This iPad
  • Slack: How to Change the Description of Your Role
  • Google Duo: How to Prevent People from Being Able to Use Your Email Address to Contact You
  • How to Fix Microsoft Teams Error caa70004

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.

Follow me on Twitter, or visit my personal blog.

You May Also Like

© Copyright 2021 Technipages · All Rights Reserved · Privacy