I'm trying to accomplished this by trying some commands but when i start with "Get-AzResourceGroup" i get below error:
ERROR:
Get-AzSubscription : Method 'get_SerializationSettings' in type 'Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient' from assembly 'Microsoft.Azure.PowerShell.Clients.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. At line:1 char:1
'Az.Accounts' verison is 2.13.0. I have also tried to downgrade this to 2.12.1 but not luck 'Az.Resources'verison is 6.10.0
Any powershell script you suggest will be highly appreciated.
I was able to make it work with shorter script in lower version of PS as mentioned below:
Get-AzManagementGroup -GroupName <MgmtGroup name> -Recurse | ForEach-Object { Get-AzResourceGroup}