Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Credential switch for invoke-dbccheck is not passing the specified credentials #1012

Open
3 tasks done
ap-tnt opened this issue Aug 30, 2023 · 0 comments
Open
3 tasks done

Comments

@ap-tnt
Copy link

ap-tnt commented Aug 30, 2023

Bug Report

General Troubleshooting steps

  • Verified running the latest release of dbachecks?

Does (Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString()
Yep

  • Verified errors are not related to permissions?
  • Can duplicate in new/clean PowerShell session (clean = powershell -NoProfile)?

Version Information

  • Operating System (Name|Version): Windows 10 21H2
  • PowerShell Version: 5.1.19041.3031
  • SQL Server (Edition|Version): Microsoft SQL Server 2016 13.0.6430.49 (X64) Standard Edition

Steps to Reproduce

$cred = Get-Credential -UserName 'domain\user1'
invoke-dbccheck -sqlinstance "sql01" -check lastgoodcheckdb -Credential $cred

Description of Bug

I would like the above code to connect to sql01 using the domain\user1 account. However, it runs invoke-dbccheck as the user who is running Powershell. I can verify that the credentials running Powershell are being used to connect to sql01, as there are login failures on sql01 relating to said user, and the credentials running Powershell do not have any permissions to connect to sql01.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant