Skip to content

Get-DbaReportingService does not use passed credentials for Get-DbaCmObject callsΒ #9750

@CwnAnnwn

Description

@CwnAnnwn

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

Reports of the failure to find the SSRS version NameSpace have not provided me a clue to resolving the same issue which I am experiencing. When I call Get-DbaService the processing of SSRS fails. In the normal environment I am calling the function from a central server against a known SSRS server. The calls are made using an account that does not have elevated permission on the remote server, so a credential that does have that access is passed. The call fails with the warning of "No version Namespace on $Computer", though it's SSRS 2019. If I grant the executing credential, not the otherwise passed credential, Admin access, and skip passing the credential, the process succeeds. Looking at Get-DbaReportingService I see the Get-DbaCmObject calls are made without the credential, starting from where I get the error. It would seem the credential needs to be used during each Get-DbaCmObject call when it's passed in.

Steps to Reproduce

$cred = Get-Credential #has Admin access to SSRS Server
Get-DbaService -SqlInstance SSRS2019.Server -Credential $cred

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

2.5.5

Other details or mentions

No response

What PowerShell host was used when producing this error

Windows PowerShell (powershell.exe), Windows PowerShell ISE (powershell_ise.exe), VS Code (integrated terminal)

PowerShell Host Version

tested from Windows Powershell:
PSVersion 5.1.17763.7553

VSCode
PSVersion 7.5.2

SQL Server Edition and Build number

Microsoft SQL Server 2019 (RTM-CU32-GDR) (KB5058722) - 15.0.4435.7 (X64)
Jun 9 2025 18:36:12

.NET Framework Version

.NET 9.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugs lifetriage requiredNew issue that has not been reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions