dbatools - Connect-DbaInstance

  • I have my SQL servers name, UserID (UID) and Password (PWD) in a table (encrypted).

    I know how to get this into a variable array.  I also know how to use that with invoke-sqlcmd  because it has a connectionstring param that accepts UID/PWD.

    But I want to use Connect-DbaInstance in a scheduled loop script because I want to use dbatools commands against the databases that are in different domains (not trusted).  How do I pass the UID/PWD in the -SqlCredential parameter of Connect-DbaInstance?  I have a mix of integrated security and sql account security across the different servers in different domains.

    Thanks

  • Unsure how many people here use DBATools as it's not talked about much.

    But the module maintainers and other users of DBATools all hang out in Slack (you can join via this link https://dbatools.io/slack) and join the #dbatools channel.

    A lot of the people there are very helpful in these sorts of matters and with a few things PowerShell also.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply