Powershell Command not working

Shubham Joshi 1 Reputation point
2021-02-27T23:01:37.927+00:00

Hi for creating or getting managment group the command , Getting error :

New-AzManagementGroup : The term 'New-AzManagementGroup' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.

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,363 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 96,361 Reputation points MVP
    2021-02-28T02:04:04.727+00:00

    Hi @Shubham Joshi ,

    where are you trying to start the New-AzManagementGroup (on your computer, in the Cloud Shell in the Azure Portal, in Azure Automation)?

    Make sure the AZ module is installed and imported. New-AzManagementGroup is part of the AZ module or in Azure Automation in the Az.Resources module.

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

  2. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,651 Reputation points Microsoft Vendor
    2021-03-01T06:22:41.557+00:00

    Hi,

    Have you installed the module Az.Resources? If yes, try importing the module Import-Module -Name Az.Resources.

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments