Install-DbaMaintenanceSolution can't remove jobs when -SqlCredential is used #5096
Closed
Description
Before submitting a bug report:
- Ensure you are able to reproduce it on the latest released version (we release often)
- Verified this bug is not already reported in an issue
- Verified errors are not related to permissions
- Can reproduce in a clean PowerShell session (clean =
powershell -NoProfile
)
Steps to Reproduce
$cred = Get-Credential
# server1 is a docker container, no SSPI auth
'server1' | Install-DbaMaintenanceSolution -SqlCredential $cred -ReplaceExisting -BackupLocation /backups -InstallJobs
Expected Behavior
Run without errors
Actual Behavior
Details
Calls to Agent commands don't inherit $SqlCredential
variable.