Closed DiHo78 closed 6 months ago
The issue relates to this - when $sqllogins
is the name of the parameter it trips this if statement - which then sets the $Type = 'sql'
Looking back through the git history for this file - there used to be parameters for SQLLogins
and WindowsLogins
- this was later simplified to use the Type
parameter.
Now that Type
is a parameter and SqlLogins
, WindowsLogins
no longer exist we can tidy up the code to resolve this issue... PR incoming!
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
No error but also no proper outcome of Copy-DbaLogin See code example below Customer of ours tried to utilize Copy-DbaLogin in combination with an array of given logins to copy. Called it $sqllogins which seems to collide with a check inside Get-DbaLogin
Thx to @jpomfret for already having a 1st look
Steps to Reproduce
Please confirm that you are running the most recent version of dbatools
dbatools version 2.1.10
Other details or mentions
No response
What PowerShell host was used when producing this error
Windows PowerShell ISE (powershell_ise.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.17763.5576
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.5576
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2019 (RTM-CU25) (KB5033688) - 15.0.4355.3 (X64) Jan 30 2024 17:02:22 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.8.4645.0