-
-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync-DbaLoginPassword - command to sync passwords based on hashed value #8985
Conversation
In case you have not seen it: AppVeyor says: Get-LoginPasswordHash.ps1 is not compliant with the OTBS formatting style |
The Set command runs fine on local instances for piping support. I'm giving up fixing tests at this point because it would be to many changes on this PR> |
if its 100% failure every time, that usually does point to something. could some sort of use of "localhost" be an issue? |
Why would splatting affect piping? |
Yeah, what I figured. I removed my changes to the command and it still fails just like the snapshot command (that isn't touched in this PR). |
k, rerunning just the fialed commands! I got a new code signing cert and will be margining singing this today. |
aw nooo, there are conflicts 😭 i will hae to return to this one later but i do very much want the changes in there |
lol this is getting worse, ill fix it when i have a chunk of time <3 |
There are so many changes in this PR that are not replated to the titel "Sync-DbaLoginPassword - command to sync passwords based on hashed value". @wsmelton : Maybe you can split this PR and move all the formatting stoff in a new PR? |
The fault is our testing so all the changes in this PR are related to the PR context where I attempt to have the tests pass for the branch. |
hey @wsmelton -- i got most things fixed except this one
Any idea whats up? |
Yeah that's the one that won't run correctly in Appeyor. That test runs fine locally. |
I'm trying to figure out where I can get a lab spun up and will start working on this one again... |
Includes bumping the version of PSSA, so some commands not being caught before with formatting issues are included in this PR.
Type of Change
.\tests\manual.pester.ps1
)Purpose
Adding functionality to support syncing passwords between instances using a hashed password value.
Approach
Internal function added
Get-LoginPasswordHash
that uses T-SQL from Microsoft in thesp_help_revlogin
to grab the hashed password value.A number of updates to
Set-DbaLogin
to improve performance but also a new parameter,-PasswordHash
, that allows it to handle setting the password by hash. It belongs in that command, and makes it where it can be used outside of the sync process if user desires.This provides support for adding password sync to
Sync-DbaAvailabiltyGroup
now if anyone wishes.Commands to test
Test included
Screenshots
Learning
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/security/transfer-logins-passwords-between-instances