June 10th, 2016

PowerTip: Export Azure resource group as JSON by using PowerShell

Doctor Scripto
Scripter

Summary: Use the Azure Resource Manager cmdlets to export a resource group as a JSON configuration.

Hey, Scripting Guy! Question I’ve heard that JSON is used to define features in Azure Resource Manager. Is there a way to export a resource group in JSON format?

Hey, Scripting Guy! Answer Just use the Export-AzureRMResourceGroup cmdlet and provide the resource group name. It will automatically save a JSON file that matches the resource group name in your current folder. Here is an example:

Export-AzureRMResourceGroup –resourcegroupname HSG-AzureRG

The Doctor

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.