Request for a new function which can generate a Multi Script project configuration file. At a minimum, the information build out the connection & database list. Ideas:
- Accept an optional
PSCredential object to use for embedding SQL Authentication credentials in the configuration. Multi Script encrypts/encodes the passwords (good!) and the method for doing that is unknown to people outside Red Gate.
- Accept a list of databases for the target server to add into the configuration, as an input object (collection) or via the pipeline.
- Create the configuration file in an alternate location (so your default/normal one isn't disturbed)
- Launch Multi Script with the newly-created configuration file
One possible usage (assuming one has the dbatools module):
$cred = Get-Credential -username "MyUser" -Message "SQL Credentials"
Get-DbaDatabase -SqlInstance "MyServer" -Credential $cred | Where-Object {$PSItem.Name -like "a*"} | New-MultiScriptConfig -ServerName "MyServer" -Launch
Quick first thoughts, definitely open to discussion. I have delved too far into command-line usage of Multi Script but having Powershell control of more of Multi Script could be useful.