Reuse a connection #7342
Unanswered
LeonardRutkowski
asked this question in
Q&A
Replies: 1 comment
-
I guess I should have done a better job of research. Found the Connect-DbaInstance. I think that's what I need. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way, to use the same connection, to various dbatools commands. Currently, I am using the -SqlCredential option for all of my commands. I l create the credential, then do -SqlCredential $Credential, as an example. But, I noticed I am getting multiple logins to the SQL instance. I am executing a loop, to add logins, and each command seems to do a separate connection, but doesn't disconnect, so now I have multiple connections, when I really only need to login and use a single connection. I am doing other commands, as well, and so each one connects as a separate connection.
Thanks,
Leonard
Beta Was this translation helpful? Give feedback.
All reactions