New-AzSubscription vs New-AzSubscriptionAlias

MS Techie 2,681 Reputation points

What is the best way now to create an Azure Subscription using PowerShell.

Can we use the command New-AzSubscription ? I see lot of articles on internet stating the command is broken . Is this issue fixed.

Now i think there are lot of commands to create new New-AzSubscriptionAlias. is this command in preview ?

But if i dont want to go for the PREVIEW ones, what is the best way to use GA command to create new subscription

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,160 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,432 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,466 Reputation points

    Hello @MS Techie

    Most of scripts on the internet is possible that are not updated for azure changes in formats or syntaxes. There is a fresh publication from Microsoft on the matter that should work successfully:

    you can find all details here:

    Hope this resolves your query,
    Best regards,

    0 comments No comments

  2. Monalla-MSFT 12,681 Reputation points

    @MS Techie - Thanks for reaching out.

    As @Limitless Technology rightly said about the fresh publication from Microsoft.

    To your point, There is no New-AzSubscription command that I'm aware of, the New-AzSubscriptionAlias command is in preview.

    If you want to use PowerShell, youneed to use the New-AzSubscriptionAlias command.

    See this article for more information: programmatically-create-subscription

    Hope this helps.

    If it does, Please feel free to "accept the answer" so it can be beneficial to the community.

    0 comments No comments