So which one should you use first .. Whether to set-azuresubscription and then Select-Azuresubscription. This will be obvious for most of them. But there are number of people who do get confused between the two (That includes me).
Select-AzureSubscription will set the current subscription.
Why you should use Set-AzureSubscription vs Import-of Select-AzureSubscription.
When you export the settings using Get-AzurePublishSettingsFile , it exports file with all the subscriptions for the given account with Management Certificate. When you using Import-AzurePublishSettingsFile store the details in the powershell files.
There will be scenarios , where there is no need to import the entire Subscription and Certificates, just only one subscription that’s where
accessible and installed locally in the user’s personal certificate store, or in the local machine’s personal certificate store.
Following command will create certificate file and store in the Local machine
makecert.exe -pe -n “CN=” -ss My –r .cer will create certificate.
Upload the Management Certificate
PS C:\ > $thumbprint = “xxxxxxxxxxxxxxxxxxxxxxxx”
# get the Management Certificate Thumbprint
PS C:\ > $mycert = Get-item Cert:\CurrentUser\My\$thumbprint
# retrieve the thumbprint from the Currentuser store
Use the Set-AzureSubscription cmdlet to store the management certificate associated with a subscription. The management certificates specified for a subscription must be