Az CLI has many advantages over the Az
PowerShell modules, but natively it does not integrate very nicely with PowerShell scripts. That is mainly because of two reasons:
- The output of AZ CLI needs to be parsed in order to chain commands together
- Exception handling within PowerShell's try-catch clauses is not possible
Both problems can be tackled with a very simple wrapper function:
function paz {