dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 787 forks source link

Get-DbaLogin - clean up old code causing issues #9291

Closed jpomfret closed 3 months ago

jpomfret commented 3 months ago

Type of Change

Purpose

Fix an issue where the command didn't work properly if you had a variable in your session called $SqlLogins

Approach

Remove deprecated code - this used to be needed, but after the parameters were renamed it no longer is.

Commands to test

# this should work
Get-DbaLogin -SqlInstance $source |ft

# then set a variable and rerun - it'll only show sql logins - after this PR this works
$sqllogins = @(
"myDomain\UserA",
"myDomain\UserA")
Get-DbaLogin -SqlInstance $source |ft

Screenshots

Before - shows issue - second screenshot there are now Windows* logins image

After - variable doesn't change results image

tests passing image

jpomfret commented 3 months ago

believe test failures are unrelated

potatoqualitee commented 3 months ago

thank you! set it to redo tests and will merge whent they pass 🙏🏼

jpomfret commented 3 months ago

Thanks @potatoqualitee 🐱