Azure Classroom Series – 27/Feb/2020

Powershell

  • Cmdlets:
    • smallest unit of action in Powershell
    • Cmdlets will be in the form of <verb>-<noun>
    • Examples
    New-Item
    Get-Command
    Get-Help
    
    • Get-Command Cmdlet helps in finding the cmdlets available on the system
    • Get-Help Cmdlet is used to find the help
  • Pipe: Like linux/unix pipe is used to send the output of one command to other, but unlike linux/unix in the powershell the objects are transferred

Azure Powershell

  • Refer Here

  • Refer Here for Azure Powershell Installation

  • Lets Get Started with Creating a resource Group

 Get-Command '*-AzResourceGroup'
 Get-Help 'New-AzVirtualNetwork' -Online
  • I’m sharing a simple PS to create and delete Resource group, please add the virtual network with 4 subnets and a network security group

# Create a resource group
$rg = New-AzResourceGroup -Name 'fromps' -Location 'centralus'

# Create a virtual Network
$vnet = New-AzVirtualNetwork -Name 'vnetfromps' -ResourceGroupName $rg.ResourceGroupName -Location $rg.Location -AddressPrefix '10.10.0.0/16'


# Remove Resource Group
Remove-AzResourceGroup -Name $rg.ResourceGroupName -Force

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube