Category "azure-powershell"

Get-AzKeyVault -InRemovedState call from Azure Function returns null even after long wait

Here's the sequence of actions performed inside Azure powershell function - if (Get-AzKeyVault -VaultName $name) { #This should Delete the KeyVault and put

How to Get Azure AD Object by Object ID Using Azure CLI

In the Azure Portal, one can look-up an Azure AD object based on the Object ID as shown below: Is it possible to retrieve an Azure AD object by the Object ID u

Invoke-Sqlcmd with AAD authentication

In an Azure DevOps 'release pipeline', I provision Azure resources - including SQLServer databases - and try to configure access to databases using managed iden

How to enable Update Management for an Azure Automation Account programmatically?

I'm currently using Terraform and bits of Powershell to automate all of my infrastructure and I'm seeking a fully automated means to configure update management

Create replica of Azure DB for my SQL Server using powershell

While creating replica of Azure DB for my SQL Server using powershell getting the below error. Please help me to fix. Command to create replica of DB server: 1s

How to pass Json parameters to powershell script

I would like to pass Json data to Powershell script. PowerShell script: Get-AzMySqlFirewallRule -ResourceGroupName "dev" -ServerName "dev-DB-Server" | Out-File

Get-AzureADAuditSignInLogs returning $null in Automation Accounts

I have a simple script to get the last sign in details for each user in Azure. When running the script from Visual Studio, it all runs fine with no errors. Afte

Resume Azure VM backup using powershell script after disabling backup

I would like to resume my backup after disabling backup. Used the below commands for disabling and enabling. Disabling backup :Disable-AzRecoveryServicesBackupP

Connect-AzAccount : The term 'Connect-AzAccount' is not recognized as the name of a cmdlet, function, script file, or operable program

I am trying to execute the following PowerShell script in Azure DevOps pipeline by using PowerShell task with inline mode. $clientId= "xxxxxxxxx" $clientSecre

How can you use secret variables from a linked variable group in an Azure Powershell task in an Azure Release pipeline?

I have an Azure Release pipeline that I've built using the GUI in Azure DevOps. There is a stage that has a linked variable group (Release scope) with a secret

How to start or stop appservices in Azure

I want to stop my appservices at midnight and want to start them at morning.So i came across two things , runbooks and webjobs .So first i included a runbook wh