Questions tagged [powershell-az-module]

35 questions
0
votes
1 answer

Azure Function gives "InvokeMethodOnNull" error when calling Start-AzContainerGroup

I have a basic Azure Function running Powershell. I have followed instructions from the Microsoft Learn Tutorial to create an HTTP trigger to start a Container Instance. I have modified the tutorial after various attempts, so that the code now just…
0
votes
1 answer

The specified module 'Az' with version '8.0.0' was not loaded because no valid module file was found in any module directory

I have a PS script as a YAML task to install Az module. On deployment, I see this error: The specified module 'Az' with version '8.0.0' was not loaded because no valid module file was found in any module directory. Here is the…
user989988
  • 3,006
  • 7
  • 44
  • 91
0
votes
1 answer

Powershell script to get the list of VM SKUs with certain capabilites (Get-AzComputeResourceSku)

I wanted to write a PS Script to get the list of SKUs in a region for which certain capabilities (such as MaxDataDiskCount, CpuArchitectureType etc) are enabled. In my case I wanted the list of VM SKUs in a given region with UltraSSDAvailable…
0
votes
1 answer

Azure CLI - Set Azure Application Gateway Backend settings

I have created a Powershell script that calls the Az module..."az network application-gateway probe create" -…
0
votes
2 answers

az sql db show returns $true when database does not exist

Do you have any idea why it's not working correctly? $resut = az sql db show --name "NotExistingDB" --resource-group "rg" --server "server" | ConvertFrom-Json checking if database exists - it should return false because it does not. $? :- Writing…
MatS
  • 1
0
votes
1 answer

ListKeys permissions required for adding queue message to Azure Storage using Windows Powershell Az module

Using the Az module for Powershell I need to put a message onto an Azure Storage queue. Proper RBAC permissions are assigned. I can do this just fine with the Azure CLI (which at the moment I cannot use on my target system unfortunately). …
baouss
  • 1,312
  • 1
  • 22
  • 52
0
votes
1 answer

Get-AzureRmResource showing up the deleted resources also

I am creating a powershell script using Azure CLI where I am using Get-AzureRmResource command to fetch all the resources in a subscription. This command is giving the details of deleted resources also , which are not longer in Azure portal as well.…
0
votes
1 answer

List of all Windows VMs under all subscriptions under a single Tenant

I want to write a script (preferably PowerShell calling the Az cli modules) that lists of all Windows VMs (whether allocated or de-allocated), subscription, resource-group, vm-name, the os system, the OS version, latest patch information under all…
Ian Carrick
  • 242
  • 3
  • 18
0
votes
0 answers

DBATools :: where can I find the SqlInstance in PowerShell?

I want to write a script that: list all Azure Subscriptions --> and find all Azure SQL Servers list all Azure SQL Servers --> and find all Azure SQL Databases that are not master list all Azure SQL Databases --> and run the query SELECT…
0
votes
1 answer

Azure PowerShell :: how to print a list of properties

I found on this post how to print the the Azure Subscription ID: (Get-AzContext).Subscription.id But if I look in the official documentation of the command Get-AzContext I don't see anywhere that the .Subscription.id or .id would print that…
Francesco Mantovani
  • 10,216
  • 13
  • 73
  • 113
0
votes
2 answers

Set-AzDataFactoryV2 : A parameter cannot be found that matches parameter name 'PublicNetworkAccess'

I am trying to disable Public Network Access of Azure Data Factory through az powershell. As per Microsoft documentation, there is a property called PublicNetworkAccess. So I tried below commands, Import-Module Az.DataFactory Set-AzDataFactoryV2…
0
votes
2 answers

Connect-AzAccount prompt issue

When I use Connect-AzAccount a prompt is opened in a browser like window(cannot ascertain which browser it is). It follows along correctly until it reaches organization's login page. And then the submit button is not working. There is also a 3rd…
Blue Clouds
  • 7,295
  • 4
  • 71
  • 112
0
votes
1 answer

How to clean up multiple Azure resources with single powershell command or script?

I am trying to clean up the unused resources in my Azure subscription. there are about 80-90 resources in each subscriptions. It is possible to select and search one by one and delete them. Is there anyway to export the resource names and call a "az…
0
votes
1 answer

Solution to Azure: New-AzCdnProfile: Operation returned an invalid status code 'BadRequest'

I am using Pay-as-you-go subscription and i was using below Powershell command to create cdn profile. New-AzCdnProfile -ProfileName "cdnprofileforcache" -ResourceGroupName "rg-cdn" -Sku "Premium_Verizon" -Location "Uk South" -ErrorAction Stop…
Pramod Lawate
  • 615
  • 1
  • 7
  • 21
0
votes
1 answer

Install Az module in the packages for a project in Visual Studio

I am trying to install the Az Module to use Az.Accounts commands and few others. I want to install the module for one specific project and be able to see that as a project depedency in the solution explorer in VS 2019 here: Here I want Az Module as…