dbachecks icon indicating copy to clipboard operation
dbachecks copied to clipboard

Invoke-DbcCheck -Tag CIS finds non existing orphaned users

Open eliassal opened this issue 3 years ago • 3 comments

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

I ran commands against 2 DBs as follows

Invoke-DbcCheck -Tag CIS -Show Summary -PassThru | Update-DbcPowerBiDataSource

I get 3 lines in powerBI image

when I try to search who is this user in the 1st DB for example directly in SSMS, it does not find any orphaned user in the mentioned DB

and even I visited the security tab in the DB, nothing unusual image

Steps to Reproduce

# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference

Please confirm that you are running the most recent version of dbatools

1.1.64

Other details or mentions

No response

What PowerShell host was used when producing this error

PowerShell Core (pwsh.exe)

PowerShell Host Version

[32;1mName Value[0m [32;1m---- -----[0m PSVersion 7.2.5 PSEdition Core GitCommitId 7.2.5 OS Microsoft Windows 10.0.19044 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

SQL Server Edition and Build number

Microsoft SQL Server 2016 (SP3-OD) (KB5006943) - 13.0.6404.1 (X64) Oct 18 2021 09:37:01 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor)

.NET Framework Version

.NET 6.0.6

eliassal avatar Nov 12 '22 12:11 eliassal

Can you run Get-DbaDbOrphanUser -SqlInstance SQLInstance and verify you get results back?

tboggiano avatar Nov 15 '22 18:11 tboggiano

hello, running the

commandGet-DbaDbOrphanUser

gave a completely different result

In the PBI, dbacheck announces 3orphaned users whereas on the command lin, 2nd snapshot it shows 15

image

image

eliassal avatar Nov 16 '22 15:11 eliassal

Also, please note that the 1st 1 is not orphaned as it is an AD account for a developer

image

eliassal avatar Nov 16 '22 16:11 eliassal