Please change the examples to reflect the AZ module.
Ex:
Search-AzureRmGraph -Query "summarize count()"
Is not working, the correct command is
Search-AzGraph -Query "summarize count()"
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@BMichaelJ Both should continue to work as both are still supported. What environment are you trying this from (Cloud Shell, Windows PowerShell, PowerShell Core)? There's a schedule for converting AzureRm to Az for each service and the change over for this docset will happen on that schedule (tentatively this month or next).
From Cloud Shell (using PowerShell), I just used both:
PS Azure:\> Search-AzureRmGraph -Query "summarize count()"
count_
------
85
Azure:/
PS Azure:\> Search-AzGraph -Query "summarize count()"
count_
------
85
@MicrosoftDocs/azure-cxp-triage Please assign to me, label 'product-issue', and #in-progress.
Ok, makes sense, just installed the AZ module and following the steps in this doc it is recommended to uninstall AzureRM.
So just going according the guide and the steps it gets confusing when the examples do not work.
When you installed the Az module per the steps under 'PowerShell Core', did you perform step 3 - Enable-AzureRmAlias? This should enable an Az install (where AzureRm is uninstalled or was never installed) to use AzureRm cmdlets as aliases. This is what enables all the existing command samples to work for either AzureRm or Az install.
No i did not enable the aliases, maybe i should read the documentation better.
Give the aliases a try and let me know if that fixes it. I'll leave the issue open until you confirm in case that doesn't fix your issue and it's something else.
It is ok, i am running the AZ module going forward and if i need the AzureRM i can install that and enable the aliases. Was not an issue once i figured out that the examples for AZ.
Ok, just wanted to make sure we solved it for you. For clarity, you don't install AzureRm to enable the aliases. Enable-AzureRmAlias basically created aliases for the old AzureRm cmdlets to the new Az cmdlets. This way if you have legacy code or, in this case, samples, that continue to use AzureRm cmdlets, the samples will still work on your Az only install. Thanks for the question and please let us know if you have others or spot other questions / issues in the docs!
@MicrosoftDocs/azure-cxp-triage #please-close
Thank you for that clarification, this has been a great experience