* support MI for CLI * support MI for PowerShell * refactor and fix typo * adjust logic according to review comments * create a type for PS Script output and add some test cases * rename servicePrincipalKey to servicePrincipalSecret