Bug Report
General Troubleshooting steps
Does (Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString()
Yep
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.
Bug Report
General Troubleshooting steps
Does
(Find-Module dbachecks).Version match (Get-Module dbachecks).Version.ToString()Yep
powershell -NoProfile)?Version Information
Steps to Reproduce
$cred = Get-Credential -UserName 'domain\user1'invoke-dbccheck -sqlinstance "sql01" -check lastgoodcheckdb -Credential $credDescription 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.