Skip to content
Discussion options

You must be logged in to vote

It seems upstream they also can only infer if the pass has changed, so I don't think using the PassswordChanged value will actually be a different functionality:

https://github.com/dataplat/dbatools/blob/918182a32f96c20ee9fa28a7a6ede2a48eba233f/public/Set-DbaLogin.ps1#L432-L433

A workaround may be to "create" the login with a task in check mode first, then depending on if it exists or not, followup with a task to create the login (including password) or modify the login (not including password, or using skip_reset).

Or, another route would be to use a nonquery with T-SQL to ensure the login simply exists & has the desired password, then perform all the other config using a login task, rem…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lowlydba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
wontfix This will not be worked on
2 participants
Converted from issue

This discussion was converted from issue #256 on October 03, 2026 16:57.