Copy-DbaSsisCatalog - Cannot find an overload for "integration services" and the argument count "1"
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
While running the command Copy-DbaSsisCatalog, I receive the error about overloads for IntegrationServices mentioned in the title. I was able to find this line https://github.com/dataplat/dbatools/blob/53f58c5313c938398a2f0b4dfd55aafdf791c406/public/Copy-DbaSsisCatalog.ps1#L279 and this line https://github.com/dataplat/dbatools/blob/53f58c5313c938398a2f0b4dfd55aafdf791c406/public/Copy-DbaSsisCatalog.ps1#L315
attempting to create a new IntegrationServices Object and passing 1 parameter. It turns out that this command does not accept 1 parameter. I have included a command to reproduce that issue as well.
Copy-DbaSsisCatalog error output
PSMessageDetails` :
Exception : System.Management.Automation.MethodException: Cannot find an overload for "IntegrationServices" and the argument count: "1".
at System.Management.Automation.Adapter.GetBestMethodAndArguments(String methodName, MethodInformation[] methods,
PSMethodInvocationConstraints invocationConstraints, Object[] arguments, Object[]& newArguments)
at System.Management.Automation.DotNetAdapter.ConstructorInvokeDotNet(Type type, ConstructorInfo[] constructors, Object[] arguments)
at Microsoft.PowerShell.Commands.NewObjectCommand.CallConstructor(Type type, ConstructorInfo[] constructors, Object[] args)
TargetObject :
CategoryInfo : InvalidOperation: (:) [New-Object], MethodException
FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
New-Object error
PS C:\WINDOWS\system32> $test = New-Object Microsoft.SqlServer.Management.IntegrationServices.IntegrationServices $dest
New-Object : Cannot find an overload for "IntegrationServices" and the argument count: "1".
At line:1 char:9
+ $test = New-Object Microsoft.SqlServer.Management.IntegrationServices ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
Steps to Reproduce
PS C:\WINDOWS\system32> $source
ComputerName Name Product Version HostPlatform IsAzure IsClustered ConnectedAs
------------ ---- ------- ------- ------------ ------- ----------- -----------
comptername computername Microsoft SQL Server 15.0.4249 Windows False False ad\login
PS C:\WINDOWS\system32> $dest
ComputerName Name Product Version HostPlatform IsAzure IsClustered ConnectedAs
------------ ---- ------- ------- ------------ ------- ----------- -----------
computername computername Microsoft SQL Server 14.0.3460 Windows False False ad\login
PS C:\WINDOWS\system32> $wincred
UserName Password
-------- --------
ad\login System.Security.SecureString
Copy-DbaSsisCatalog -Source $source -Destination $dest -SourceSqlCredential $wincred -DestinationSqlCredential $wincred -Debug
Please confirm that you are running the most recent version of dbatools
2.0.4
Other details or mentions
No response
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.20348.859
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.859
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2019 (RTM-CU17) (KB5016394) - 15.0.4249.2 (X64) Jul 22 2022 12:11:33 Copyright (C) 2019 Microsoft Corporation Standard Edition (64-bit) on Windows Server 2022 Standard 10.0 <X64> (Build 20348: ) (Hypervisor)
.NET Framework Version
PSChildName Version
Client 4.8.04161 Full 4.8.04161 Client 4.0.0.0
It is failing because the library seems to have changed usage since we last had this command working in the module.
Background we had removed this back in v1.x.x at some point. We added it back in 2.0 but can't really test them well because the images we use in AppVeyor do not have SSIS installed.
Ok, I found a way to get the Microsoft.SqlServer.Management.IntegrationServices.IntegrationServices object. But I can not test this as I don't have the time to setup SSIS. Will open a PR to show the changes. Maybe someone can start from there...
Seems this is still not fixed, any one update on this?
WARNING: [17:23:55][Copy-DbaSsisCatalog] There was an error connecting to the source integration services. | Cannot find an overload for "IntegrationServices" and the argument count: "1".
Let me reopen the issue - but we need someone to analyze the problem as I don't have time to set up a lab.