简体   繁体   中英

Convert azure cli script to azure powershell CLI function

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? eg :
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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM