Using Visual Studio 2017,
- I created a new Azure Resource Group Deployment project from template.
- I replaced the content of the parameters and template file with ones I had already generated from another resource group that I had manually created.
- I right clicked on the project and deployed.
- I discovered that the resources deployed to another subscription of mine that was not selected in the drop-down menu.
- While trying to discover how it was selecting the target subscription, I copied the generated powershell deployment script, parameters and template file to another folder that did not have the visual studio project in it.
- I ran the powershell script, and the resources deployed as before without requiring any credentials of mine.
I believe that visual studio has stored my credentials and deployment settings somewhere, but I can't discover where. I suspect it's some fixed location that's known by powershell because the script works from any directory on my system, but I haven't been able to discover any information about where that might be.
How am I able to run this script from anywhere, and where is the magic file that has my creds in it (if it exists)?