Scripting and Command Line Tools

Azure provides two command line tools – PowerShell and Cross-Platform CLI – for you to manage your Azure subscriptions, accelerate your development and automate tasks via scripting, no matter whether you are on Windows, Mac or Linux.

If you have any feedback on Azure PowerShell or Azure Cross-Platform CLI, we’d love to hear it.

  1. azure CLI does not properly give you the error feedback.

    Azure CLI does not properly give you the error feedback. To get the error that is occurring you need to go to the portal and get into the Kudu tool and check it there

    14 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Xplat-CLI  ·  Flag idea as inappropriate…  ·  Admin →
  2. Remove one hour timeout from PowerShell sessions when connected using MFA with trusted IPs

    According to this page: https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell?view=exchange-ps

    There is a note stating that there is a one hour timeout for PowerShell sessions using MFA and in order to avoid this issue, configure trusted IPs in the MFA settings in Azure Active Directory.

    I configured trusted IPs in our MFA setup and continue to experience session timeouts after 1 hour. Opening up a support ticket with Microsoft confirmed this is an ongoing issue requiring the attention of support engineers to resolve.

    Please fix this issue so we can run PowerShell queries and scripts which require more than one hour to complete.

    14 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  3. Missing functionality in Azure CLI

    I see Azure PowerShell command to get and set owner for Active Directory applications. Need something similar in Azure CLI.

    https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadapplicationowner?view=azureadps-2.0

    Can you please keep Azure CLI up to date with functionality that is available in Azure PowerShell

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Xplat-CLI  ·  Flag idea as inappropriate…  ·  Admin →
  4. Remove Azure VNet Using PowerShell Script

    Hi Guys,

    I am trying to remove the vnet from my subscription using power shell script but I am not able to find any way. I am also refer some blog for the same and I am not able to find it.

    So can you suggest me, How can I remove vnet using power shell?

    13 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  5. Deploy Multiple Domain joined Azure VM's in a new or existing Cloud Service

    <#
    # .SYNOPSIS
    The script is designed to create Multiple Azure VM's and join them to the specified domain while creation.
    Using this script you can achieve:
    1.Create Multiple Azure VM's under the same Cloud Service
    2.Add additional Azure VM's under an already created Cloud Service

    Requirements:
    1.Azure Powershell Module installed in the machine.
    2.Your Subscription Name, you need to specify the subscription name while using the script.
    3.Pre-created Affinity Group, you need to specify the name while using the script.
    4.Pre-created Storage in Azure, you need to specify the storage name while using the script.
    5.Pre-created Virtual Network in…

    12 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  6. Make Remove-AzureRmSqlDatabase really blocking (until database has really been deleted)

    Currently, the Remove-AzureRmSqlDatabase powershell cmdlet wait for the database to be deleted, but any call to Restore-AzureRmSqlDatabase or New-AzureRmSqlDatabase will result in an error "a database with named *** already exists".

    As of now, we have to retry creating the database inside a loop.

    Please make the Remove-AzureRmSqlDatabase really blocking, so that when the commands returns, we can effectively create a new database using the same name.

    12 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
  7. Identify the co-administrators in with a powershell cmdlet

    Need a way to view the administrators and co-administrators within a subscription

    11 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  8. Inventory Generation for ARM

    Create a PowerShell script to generate inventory of a particular subscription for an Azure account. It should be developed for both ASM and ARM.

    11 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  9. Write manual (man) pages for Azure CLI 2.0 on macOS/Linux systems

    Version 2.0 of the Azure CLI is supported on non-Windows platforms, such as Linux and macOS. However, the existing version of Azure CLI doesn't provide any manual (man) pages, which is the common/traditional/expected way to provide documentation on said platforms. Providing detailed man pages, including examples of usage, would make the Azure CLI much more approachable for users of non-Windows platforms (and/or new users).

    10 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Xplat-CLI  ·  Flag idea as inappropriate…  ·  Admin →
  10. Support Worker Role in Powershell

    Poweshell has all the ability of a .NET program and it's quick and easy to write a script. Allow us to create a worker role in Powershell.

    10 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Flag idea as inappropriate…  ·  Admin →

    Just to make sure I understand it correctly. So the idea is having a work role implemented in PowerShell scripts so that people can run PowerShell scripts in a cloud service?

  11. Reevaluate Azure Policy button/powershell command

    In Azure Policies, we can find the compliance state, but it will take too long to evaluate this compliance state.
    1-Please, speedup evaluation
    2- Add a button "reevaluate policy now", because after an update of the policy- customer want asap see - how his modification affect resources

    10 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    4 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  12. Azure Backup Vault Status report notification via email

    After not finding a solution online for Azure Backup Vault reports I #developed this script.

    Script by De Jager Laubscher djlmeister@gmail.com and revised by #Theodore Seroadi

    Import-module Azure

    Put Your Azure Logon details below

    $MyAzureName = "joeblogs@blogs.com";
    $MyAzurePassword = ConvertTo-SecureString 'YourPasswordHere' -AsPlainText -Force;
    $AzureRMCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist $MyAzureName, $MyAzurePassword
    Add-AzureRMAccount -Credential $AzureRMCredential
    Switch-AzureMode AzureResourceManager

    cls

    Set the backup vault name and number of days you want to report Backups for

    Put the name of your Azure Backup Vault Below

    $backupvaultname = "Your Backup Vault name"
    $numberofdays = 2

    Initialize variables

    $DAILYBACKUPSTATS = @()
    $backupvault = Get-AzureRMBackupVault…

    10 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    2 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  13. unable to use azure powershell with dreamspark

    I get the following error:
    Get-AzureWebsite : Communication could not be established. This could be due to an
    invalid subscription ID. Note that subscription IDs are case sensitive.

    Get-AzureWebsite : ForbiddenError: The server failed to authenticate the request.
    Verify that the certificate is valid and is associated with this subscription.
    In Zeile:1 Zeichen:1
    But the ID is correct

    9 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  14. Powershell Cmd to List All Alert Rules of Subscription

    Hi,

    In our environment we are trying to stop all alert rules on non-business hours. Since monitor section does not have any maintenance window, we are trying to create powershell using get all the alert rule and disable it. Please allow us to enable\disable all Alert rule(Activity\Metric\Log Analytics Query) using pwershell cmd.

    9 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  15. Please add an azure cli command equivalent to the Add-MsolRoleMember in PowerShell.

    Please see this discussion on StackOverflow https://stackoverflow.com/questions/44122993/azure-cli-equivalent-to-powershells-add-msolrolemember Since azure cli is more cross-platform than PowerShell, it would be great to have the Add-MsolRoleMember equivalent in the azure ad cli.

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Xplat-CLI  ·  Flag idea as inappropriate…  ·  Admin →
  16. add the ability to run PowerShell 3.0 from the System Center 2012 Orchestrator Runbook Run .Net Script without calling a subroutine

    I've documented this problem in the Windows Azure forums:
    http://social.technet.microsoft.com/Forums/en/scogeneral/thread/d0431d3f-52c3-41b4-be37-7c192e28a62a

    Basically you have to do a workaround to call PowerShell 3.0 from a System Center 2012 Orchestrator Runbook Run .Net Script Activity because for whatever reason the activity called PowerShell 2.0 instead which isn't supported by Windows Azure PowerShell. Calling subroutines is a royal pain.

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  17. To automate the build of DEV, QA, and PROD SharePoint 2016 farms

    To automate the build of the complete Azure environment for SharePoint 2016 farms including the networking for DEV, QA, and PROD farms that are using SQL Always On or assuming HA is required so companies can have their BUs spin up "IT Approved" full farm environments saving IT time.

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  18. ImportError: No module named 'azure'

    ImportError: No module named 'azure'

    why does this happen?

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  19. upgrade MSBuild from 14to15 onkudu as compatibility with C#7 version so could you upgrade to 15 because industry using MSBuild 15 as for C#

    we need MSBuild version 15 on kudu as compatibility with C#7 version so could you upgrade to 15 because industry using MSBuild 15 as for C#

    7 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    0 comments  ·  Powershell  ·  Flag idea as inappropriate…  ·  Admin →
  20. Azure CLI new command to disassociate public IP

    Please, add a command for Azure CLI to dissasociate an IP from a Virtual Machine! Also a command to associate it again, it would help.

    6 votes
    Vote
    Sign in
    (thinking…)
    Sign in with: Microsoft
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
  • Don't see your idea?

Scripting and Command Line Tools

Categories

Feedback and Knowledge Base