This is an old revision of the document!
Get-Service -Name * Get-Service -Name puppet Start-Service -Name puppet
$PSVersionTable.PSVersion #get version Get-Module -Name PowerShellGet -ListAvailable | Select-Object -Property Name,Version,Path # Import-Module PowerShellGet -Force #Update Powershell version Get-ExecutionPolicy #check policy Set-ExecutionPolicy Unrestricted #set policy to unrestricted Install-Module -Name AZureRM -AllowClobber #install azure module Import-Module -Name AzureRM #import azure module - "Get-ExecutionPolicy" has to be set to unrestricted! Login-AzureRmAccount #login Get-AzureRmSubscription #check active login New-AzureRMRecourceGroup -Name groupname -Location westeurope #creates new resourcegroup
Create Storageaccount:
Login-AzureRmAccount Get-AzureRmSubscription cd\ cls $location = "westeurope" $group = "test-vm-rg" $account = New-AzureRmStorageAccount -ResourceGroupName $group -Name tw012018 -Location $location -SkuName Standard_LRS Get-AzureRMStorageAccount | Select StorageAccountName, Location
https://docs.microsoft.com/de-de/cli/azure/install-azure-cli?view=azure-cli-latest
Powershell install:
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
az login --use-device-code #generate url + machine-code az login az group list --out table #show resource groups
Create resource groups:
#Azure CLI az login $group = "test-vm-rg" $location = "westeurope" $account = "tw012018" az storage account create --resource-group-name $group --location $location --sku Standard_LRS --name $account az storage account show --resource-group $group --name $account