Hola
Estoy intentando implementar un paquete dentro de un catálogo con powershell, pero a la hora de desplegar el proyecto no me funciona. Este es el código que utilizo
# Load the IntegrationServices Assembly
[Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Managem ent.IntegrationServices")
# Create IntegrationServices Assembly namespace
$ISNamespace = "Microsoft.SqlServer.Management.IntegrationService s"
$sqlInstance="HPPROBOOK4510S\IMI"
# Create a connection to the server
$sqlConnectionString = "Data Source=$sqlInstance;Initial Catalog=master;Integrated Security=SSPI;"
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection $sqlConnectionString
# Create the Integration Services object
$integrationServices = New-Object $ISNamespace".IntegrationServices" $sqlConnection
# Provision a new SSIS Catalog
$catalog = New-Object $ISNamespace".Catalog" ($integrationServices, "SSISDB", "imi")
$catalog.Create()
# Create Folder
$ssisFolder = New-Object $ISNamespace".CatalogFolder"($catalog, "Folder", "Description")
$ssisFolder.Create()
#Deployment Package
[byte[]] $projectFile = [System.IO.File]::ReadAllBytes("C:\PR\IMI.ispac")
$ssisFolder.DeployProject("ExecutionDemo", $projectFile)
$executionId = $package.Execute("false", $null)
Write-Host "Package Execution ID: " $executionId
Me funciona hasta que hago el Deployment Package, IMI.ispac es el nombre del proyecto que intento desplegar. Que hago mal?
Un saludo
Xavier