Write a Function to Create A Resource Group in Azure
Write a Function to Create A Resource Group in Azure(Part1)
Resource Group:
The Infrastructure for your application typically consist:
- Virtual Machine
- Storage
- Virtual Network
- Web app
- Database etc
A resource is a manageable item as listed above and resource group is a container that holds related
resources
$RG="Osgroup"
$Location="South Central US"
function CreateRG ($Name, $Location){
# First Check if the RG exists with this name
Get-AzureRmResourceGroup -Name $Name -ev notpresent -ea 0
if ($notpresent){
New-AzureRmResourceGroup -Name $Name -Location $Location
}
else{
Write-Host "RESOURCE GROUP $Name Exists !!! Please Specify Another Name"
}
}
CreateRG($RG,$Location)
Thank you !!! And Have Nice Day!!!
For Silent Login to Azure Account
https://osgroup-techies.blogspot.in/2016/12/silent-login-to-azure-account-is-have.html
No comments:
Post a Comment