-
-
Notifications
You must be signed in to change notification settings - Fork 859
Closed
Labels
Description
Before submitting a bug report:
Collect output of following command and paste below:
& {"### PowerShell version:`n$($PSVersionTable | Out-String)"; "`n### dbatools Module version:`n$(gmo dbatools -List | select name, path, version | fl -force | Out-String)"}
- Running latest release of dbatools
- Verified errors are not related to permissions
- If issue is with
Copy-DbaDatabase, replicate issue usingBackup-DbaDatabase ... | Restore-DbaDatabase ...
Note that we do not have the resources to make
Copy-DbaDatabasework in every environment. Instead, we try to ensure Backup & Restore work in your environment.
Environmental data
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.15063.1631
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.1631
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### dbatools Module version:
Name : dbatools
Path : C:\Users\kkravtsov\Documents\WindowsPowerShell\Modules\dbatools\0.9.797\dbatools.psd1
Version : 0.9.797
Steps to Reproduce
Invoke-DbaDbMirroring -Primary "<Hostname>\<InstanceName>" -Mirror "<Hostname>\<InstanceName>" -Database Test -SharedPath "<\\SharedPathLocation>"Expected Behavior
Runs fine
Actual Behavior
WARNING: [10:20:16][Invoke-DbaDbMirroring] Error occurred while establishing connection to | Failed to interpret input as Instance: Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]
More info
$Mirror is [DbaInstanceParameter[]] but Connect-SqlInstance allows only [DbaInstanceParameter]:
We need to either mirror (no pun intended) Connect-DbaInstance parameter set in Connect-SqlInstance or iterate over $Mirror servers in the function. Not sure which one would be 'works as intended'
Reactions are currently unavailable