Tuesday, October 4, 2016

Update SQL Login Password Powershell

This is a quick little reference on how to update the password for SQL Login when you don't SSMS installed on the machine running SQL, but you are able to login to the machine with the user that has SA the priviledges on SQL Instance.
Step 1
Login to machine (RDP, Hyper-V or however you need to run something from the machine itself)
Step 2
Start PowerShell
Step 3
Connect to SQL Server by running the following command and update password.
 
sqlcmd -s instance-name
alter login sqluser with password='StrongPassword'
go
In my case I did the following.
Step 4
Celebrate and go back to finishing preparing for a presentation or whatever else you were doing.

No comments :

Post a Comment