Skip to content

bluedoors/Azure

 
 

Repository files navigation

azureautomation2Microsoft Azure PowerShell Repo

SCRIPTS

No Script Description
1 Deploy-AzureVm.ps1 Deploy multiple Azure Iaas VM from JSON templates
2 New-SecureCred.ps1 Create file that contains encrypted password for Azure VM local admin account. The adminPassword parameter from JSON templates
3 Apply-AzVmPowerStatePolicy.ps1 Start/Stop Azure VM in parallel on schedule based on two VM Tags (PowerOn/PowerOff)

MODULES

Az-Module Azure Automation PowerShell Module

Requirements: PowerShell 5 or above. To check, type the following command: $PSVersionTable.PSVersion.Major.

To install this module, drop the entire 'Az-Module' folder into one of your module directories.

The default PowerShell module paths are listed in the $env:PSModulePath environment variable.

To make it look better, split the paths in this manner: $env:PSModulePath -split ';'

The default per-user module path is: "$env:HOMEDRIVE$env:HOMEPATH\Documents\WindowsPowerShell\Modules".

The default computer-level module path is: "$env:windir\System32\WindowsPowerShell\v1.0\Modules".

To use the module, type following command: Import-Module Az-Module -Force -Verbose.

To see the commands imported, type Get-Command -Module Az-Module.

For help on each individual cmdlet or function, run Get-Help CmdletName -Full [-Online][-Examples].

To start using the module functions:

  • Install Azure Resource Manager Module module from Microsoft PSGallery by Install-Module AzureRm.
  • Connect to your Azure account by Login-AzureRmAccount cmdlet.
  • Optionally, select your target subscription by Select-AzSubscription function.
No Function Description
1 Select-AzSubscription Interactively select Azure Subscription
2 Select-AzResourceGroup Interactively select Azure ResourceGroup name
3 Select-AzObject Interactively select an Azure object (VM, StorageAccount, VNET, AvailabilitySet)
4 New-AzCredProfile Set your PowerShell session to automatically login to the Azure
5 Get-AzOrphanedVhd Find Azure orphaned *.VHD files
6 Get-AzSubnet Get busy IP in Azure Subnets
7 Get-AzVmPowerState Get Azure VM Power State
8 Get-AzVmTag / Add-AzVmTag Get/Add/Set Azure VM Resource Tag(s)
9 Get-AzVmDisk Get Azure VM Virtual Disks (OSDisk, DataDisk, All)
10 New-AzVmDisk Add a new DataDisk to an Azure VM
11 Expand-AzVmDisk Increase Azure VM disks

Stay tuned for the updates!

About

Microsoft Azure

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%