Managing the passwords of your SQL Azure servers is now 100% scriptable. It’s so easy to reset them it’s almost like magic ![]()
The code below takes your subscription id and your management certificate and returns all of the SQL Azure servers in your subscription. It takes that collection and passes them to the Set-SqlAzurePassword Cmdlet along with the new password.
Resetting the Passwords of all SQL Azure Servers in your Subscription
$subscriptionId = "Your-ID-Goes-Here" $cert = Get-Item cert:\CurrentUser\My\YOURCERTTHUMBPRINTGOESHERE Get-SqlAzureServer -Certificate $cert -SubscriptionId $subscriptionid | ` Set-SqlAzurePassword -NewPassword "abracadabra0!"