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
0
votes
1 answer

AzureDevOps: Pass task variable to subsequent powershell task type as Object

I want to create a Pipeline that is copying files from one Azure subscription to the next one in one Azure DevOps Pipeline. For this I have setup my pipeline yaml and my two powershell scripts where the parameters are created via logging commands…
0
votes
1 answer

Swap deployment slot using Switch-AzWebAppSlot

I have the following script for swapping deployment slots: $functionApp = $functionAppName; Write-Host "Starting to swap $functionApp"; Switch-AzWebAppSlot -ResourceGroupName $resourceGroup -Name $functionApp…
user989988
  • 3,006
  • 7
  • 44
  • 91
0
votes
1 answer

WinRM with remote exec connection time out- Azure Terraform

connection { type = "winrm" user = "testadmin" password = "Password1234!" host = azurerm_public_ip.example.ip_address } provisioner "remote-exec" { script = "C:\\Proj\\Fali\\vm\\DC.ps1" } I have opened all the ports direction …
0
votes
1 answer

Powershell Loop through .csv. Find cell and apply certain policies in script to a matching field

I'm trying to write a script in Powershell, that will loop through a .csv file that contains data for Microsoft Teams. I need to apply calling policies based on the user's location. So, Look at the UPN in the first cell, if Valid, then check the…
Dillon
  • 61
  • 6
0
votes
1 answer

How can I change IIS application pool property setProfileEnvironment from Powershell?

How can I set the "setProfileEnvironment" property from Powershell? The following code is generating error "The property 'setProfileEnvironment' cannot be found on this object. Verify that the property exists and can be set." $IISServerManager =…
Andrew
  • 152
  • 12
0
votes
1 answer

Does the portal.azure.com Cloud Shell provide autocomplete for Powershell or Bash?

Are there any keyboard shortcuts, configuration, browser extensions or other settings that can be set to provide intellisense for the Azure Cloud Shell on portal.azure.com? An Edge or Chrome browser extension for either PS or Bash would suffice. I…
0
votes
1 answer

Creating SKU table pr company name in Azure

This is like the next step from another question ive asked here before. where i asked how to count and group skus. Now im trying to create a table pr Companyname. if i run the command in the 2nd foreach loop. (command below) it fails. $Report |…
0
votes
2 answers

Powershell Curl alternative with Multiform data in Body getting 400 BAD request

I have a curl command that i translated in to powershell but i get Below error ErrorMessage The remote server returned an error: (400) Bad Request. CanTimeout : True ReadTimeout : -1 WriteTimeout : -1 CanRead : True CanSeek :…
0
votes
1 answer

Installing AzureADPreview Powershell module fails in docker image

I'm trying to install / use the AzureADPreview powershell module to automate the creation of a policy. I am using the following Dockerfile for my devcontainer in VSCode: FROM mcr.microsoft.com/azure-powershell:latest I'd like to install the module…
dot
  • 14,928
  • 41
  • 110
  • 218
0
votes
1 answer

Powershell find matching cell in .csv and apply commands for the the matching cell

Right up front, I want to say I have 0 knowledge of Powershell. I'm taking a chance to see if someone out there could help me. I've been tasked to create a script that will look into a CSV file, run through each row, and based on the location of a…
Dillon
  • 61
  • 6
0
votes
1 answer

How to customize the owner while creating an app registration with New-AzureADMSApplication?

I would like to define the owner during the app registration creation by myself or suppress that an owner is set at all. The default behavior seems to be, that the command New-AzureADMSApplication adds the user that established the connection to…
spikey
  • 444
  • 1
  • 7
  • 27
0
votes
1 answer

Query blob storage with Get-AzDataLakeGen2ChildItem?

Our powershell test harness used to use Get-AzDataLakeGen2ChildItem to list blobs found in non data lake storage accounts. Today I updated the powershell and Az module versions they were locked at, and now when issuing the command (specifying a…
user13800089
0
votes
1 answer

Azure Powershell: Unable to find environment with name 'AzureCloud' on self-hosted azure devops agent

I have suddenly started getting this error on some of the agents that are installed on my Agent Pool. All of them are on the same Virtual Machine: 2022-06-13T11:07:24.5665998Z ##[command]"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile…
0
votes
1 answer

Multiple input loop for the Remove-AzureADGroupMember cmdlet?

This is a script to show all Azure AD groups of which the $User is a member of. $User = 'Compromised.UserAccount' $UserToRemove = Get-AzureADUser -SearchString $User $UserToRemove | Get-AzureADUserMembership | ForEach-Object {…
Senior Systems Engineer
  • 1,061
  • 2
  • 27
  • 63
0
votes
1 answer

Where can I find a list of the PowerShell's atributes?

I was just wondering, it would be cool to know all the atributes used in powershell commands so i can list them all and be more efficient when I have to query something, instead of looking online for the command I need. I'm probably explaining too…
Alex
  • 11
  • 4
1 2 3
99
100