Professional Documents
Culture Documents
Azure Powershell
Azure Powershell
Azure Powershell
Management
TASK 1: Create a new resource group named MyResourceGroup in the
Azure region of your choice using PowerShell
This command will prompt you to enter the password for the "azureuser"
account and then create a virtual machine with the specified image, size,
username, and password in the "MyResourceGroup" resource group.
TASK 4: Create a new NSG named MyNSG with the following rules:
Allow inbound traffic on port 3389 (RDP) from any source.
Allow inbound traffic on port 80 (HTTP) from any source.
Command used:
# Create a new NSG
$nsg = New-AzNetworkSecurityGroup -Name "MyNSG" -ResourceGroupName
"MyResourceGroup" -Location "EastUS"
$resourceGroupName = "MyResourceGroup"
$vmName =”MyVM"
$networkInterfaceName = "MyVM"