0
votes

Because Azure-CLI doesn't support runbook, function, logics, only azure powershell can do it.
So if I'd like to upload my Azure CLI script to azure, I only have to convert azure cli to azure powershell..

Is there any cli function can convert azure cli script to azure powershell? e.g :
input somefunction convert-cli-to-powershell 'az group list'
oupout : Get-AzManagementGroup

input : somefunction convert-cli-to-powershell 'az group show --resource-group system'
oupout : Get-AzManagementGroup -GroupName system

It's a heavy job when script is large..

What I've tried :
Right now, I convert cli to powershell with my hands one by one.

2

2 Answers

1
votes

I'm afraid that tool doesn't exist. You can only do it manually.

1
votes

I didn't found any resource to do it =/

You can convert your script based on the resources.

Ex: pwsh: Get-AzVm az cli: az VM show

It will be a little bit hard, but I can help you too =D