 <p><code>Select-AzureRmSubscription</code> does change the approach that Azure uses for authentication. I had the same pain points when I converted my scripts. </p> <p>The official way of approaching this via scripting is as follows - </p> <pre><code>$profile = Login-AzureRmAccount Save-AzureRMProfile -Profile $profile -path $path </code></pre> <p>You can then use <code>Select-AzureRmSubscription</code> to none-interactively load those saved profiles. </p> <p>Although ultimately I didn't go this route, I decided to add another layer of security and use a machine based certificate to encrypt / decrypt credentials to pass to <code>Login-AzureRmAccount</code> This way I could manage multiple sets of accounts and never have to be concerned about those tokens being exposed on vulnerable machines. </p>