Hi all, I am trying to extract .ispac (which is a compressed xml which I will extract metadata from) files from a SQL server, but I'm having some issues with getting the required Assemblies to connect to the SQL server.
The current error I am getting is:
"Cannot find type [Microsoft.SqlServer.Management.IntegrationServices.IntegrationServices]: verify that the assembly containing this type is loaded. InvalidOperation". This occures when I try to create New-Object Microsoft.SqlServer.Management.IntegrationServices.IntegrationServices($serverConnection)
I'm new to powershell and I'm not convinced I'm loading the correct .dlls, or that they are compatible. As can be seen below I've added Microsoft.SqlServer.Management.IntegrationServices.dll manually, but the error is indicating I haven't added it at all.
What am I doing wrong? Is there a better way to do this?
I've spent countless hours on this, and need some help. Please see my code below.