Questions tagged [azure-powershell]

The Azure module for PowerShell allows administrators to accomplish management tasks for Azure resources. The Az wrapper module includes only stable modules, the AzPreview wrapper module includes all PowerShell modules for Azure allowing to manage resources in all Azure services.

The Azure Modules for PowerShell allows administrators to accomplish many Azure management tasks through a series of cmdlets. The modules include the new Az module and the older AzureRM module (due to retire by Feb 2024).

References:

  1. Overview of Azure PowerShell

  2. PowerShell Module Browser: Search for PowerShell modules and cmdlets.

2843 questions
9
votes
3 answers

Enabling Azure SQL Database Automatic Tuning via ARM

I'm unable to find any documentation regarding enabling automatic tuning in a release pipeline i.e. through ARM templates or powershell, nor in the github arm quickstarts. I can see in the resource explorer automatic tuning is mentioned, but I don't…
9
votes
4 answers

Example of Get-AzureADUser [-Filter ] command

Command: Get-AzureADUser [-Filter ] command msdn says Parameters -Filter Specifies an oData v3.0 filter statement. This parameter controls which objects are returned. how to set filter to get the same result as Azure module v1 commands Get-MsolUser…
Sameer
  • 3,124
  • 5
  • 30
  • 57
9
votes
7 answers

Azure Powershell - Check to see if resource exists

I'm using Powershell to automate setting up my Azure environment - to create storage account, database, website, etc. In development, I want to provision and a tear down a lot. Very often, I want to run my provisioning script and create a azure…
user888734
  • 3,797
  • 5
  • 36
  • 67
9
votes
5 answers

Start-AzureStorageBlobCopy vs AzCopy: which one takes lesser time

I need to move vhds from one subscription to other. I would like to know which one is better option for the same: Start-AzureStorageBlobCopy or AzCopy? Which one takes lesser time ?
Aatif Akhter
  • 2,126
  • 1
  • 25
  • 46
9
votes
5 answers

How to check if a blob already exists in Azure blob container using PowerShell

I have a Windows PowerShell script that uploads a file to my Azure Blob Storage. I want the file only to upload if it doesn't already exists in the container. How do I check if the blob already exists ? I tired to use Get-AzureStorageBlob but if the…
Chris
  • 2,009
  • 1
  • 16
  • 25
9
votes
1 answer

Set the server farm (aka web hosting plan) when running New-AzureWebsite

I am using Azure Powershell to create a new Azure Website: New-AzureWebsite -Name MyWebsiteName Azure creates it in the Default1 server farm, whereas I need it in DefaultServerFarm. Using the -location parameter doesn't work to specify the server…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
8
votes
1 answer

Using OAuth and PowerShell to Update Azure DevOps Wiki Pages

I am trying to automate the creation of release notes in Azure DevOps release pipelines by creating a new page in the Azure DevOps wiki using it's Rest API. The issue I'm having is that I'm using a PowerShell script task to post to the Rest API and…
8
votes
3 answers

No package Az found

$ Get-InstalledModule -Name Az -AllVersions Version Name Repository Description ------- ---- ---------- ----------- 0.5.0 Az …
Deepak Singhal
  • 10,568
  • 11
  • 59
  • 98
8
votes
1 answer

Azure PowerShell Connect-AzureAD and Login-AzureRmAccount

I have a PowerShell script which uses Connect-AzureAD and also Login-AzureRmAccount. Even though both use the same credentials, I get asked to enter them twice. Is there any way to only prompt the user once and use the same credentials for both…
Gerhard Brueckl
  • 708
  • 1
  • 9
  • 24
8
votes
5 answers

Service Principal : Set-AzureRmKeyVaultAccessPolicy : Insufficient privileges to complete the operation

Post updated. Issue has been solved. The scripts below will create a resource group, create a service principal, deploy a key vault, configure permissions and write a secret to the vault. Hopes this help! :) Problem: I am logged into PowerShell as…
Tony
  • 1,394
  • 5
  • 22
  • 48
8
votes
5 answers

Can't find the Connect-ServiceFabricCluster cmdlet when using Powershell

I'm trying to follow this article about deploying a service fabric app through powershell, but I have an issue with running the Connect-ServiceFabricCluster cmdlet. I get the following: Connect-ServiceFabricCluster : The term…
8
votes
1 answer

Azure: Powershell: Set-AzureRmWebApp: How to set the "alwaysOn" property

I am running Powershell 5 and trying to manipulate my Azure WebApp object using Set-AzureRmWebApp (and NOT Set-AzureResource) to set the "Always On" property of the web app. My basic code snippet starts with a running web app named "myWebApp", and…
Jay Godse
  • 15,163
  • 16
  • 84
  • 131
8
votes
1 answer

Azure PowerShell will not connect

I have downloaded and installed the Azure Powershell by following the MS instructions: https://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/ Using the Windows Powershell ISE I run the command:…
George Filippakos
  • 16,359
  • 15
  • 81
  • 92
8
votes
3 answers

Azure VM pricing - Is it better to have 80 single core machines or 10 8-core machines?

I am limited by a piece of software that utilizes a single core per instance of the program run. It will run off an SQL server work queue and deposit results to the server. So the more instances I have running the faster the overall project is done.…
shawn.mek
  • 1,195
  • 1
  • 11
  • 17
7
votes
2 answers

Getting error "Could not load file or assembly 'System.Windows.Forms" at 'Import-Module "AzureAD" line in PS script

I am trying to deploy a simple powershell function app that contains the following commands: Import-Module D:\home\site\wwwroot\HttpTrigger1\AzureAD\AzureAD.psd1 Connect-AzureAD -TenantId $tenantId -Credential $Credential AzureAD module files have…