You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/Copy-DbaSsisCatalog.ps1
+118-4Lines changed: 118 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -62,13 +62,22 @@ function Copy-DbaSsisCatalog {
62
62
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
63
63
64
64
.OUTPUTS
65
-
None
65
+
PSCustomObject
66
66
67
-
This command performs migration operations and does not return any output objects. Check the Verbose stream for operation details, or use -WhatIf to preview what would be executed.
67
+
Returns one object per migration operation attempt. Each object represents the result of copying a single folder, project, or environment to a destination instance.
68
+
69
+
Default display properties (via Select-DefaultView with TypeName MigrationObject):
70
+
- DateTime: Timestamp when the migration operation occurred (DbaDateTime)
71
+
- SourceServer: Name of the source SQL Server instance
72
+
- DestinationServer: Name of the destination SQL Server instance
73
+
- Name: Name of the object that was copied (folder, project, or environment name)
74
+
- Type: Object type (Folder, Project, or Environment)
75
+
- Status: Result of the migration attempt (Successful, Skipped, or Failed)
76
+
- Notes: Additional details about the operation or reason for skipping/failure
68
77
69
78
.NOTES
70
79
Tags: Migration, SSIS
71
-
Author: Phil Schwartz (philschwartz.me, @pschwartzzz)
80
+
Author: Phil Schwartz (philschwartz.me, @pschwartzzz), the dbatools team + Claude
72
81
73
82
dbatools PowerShell module (https://dbatools.io)
74
83
Copyright: (c) 2018 by dbatools, licensed under MIT
@@ -394,52 +403,91 @@ function Copy-DbaSsisCatalog {
394
403
$srcFolder=$sourceFolders|Where-Object {
395
404
$_.Name-eq$folder
396
405
}
406
+
$copyFolderStatus= [PSCustomObject]@{
407
+
SourceServer=$sourceServer.Name
408
+
DestinationServer=$destinationConnection.Name
409
+
Type="Folder"
410
+
Name=$folder
411
+
Status=$null
412
+
Notes=$null
413
+
DateTime= [DbaDateTime](Get-Date)
414
+
}
397
415
if ($destinationFolders.Name-contains$folder) {
398
416
if (!$force) {
399
417
Write-Message-Level Warning -Message "Integration services catalog folder $folder exists at destination. Use -Force to drop and recreate."
418
+
$copyFolderStatus.Status="Skipped"
419
+
$copyFolderStatus.Notes="Integration services catalog folder exists at destination. Use -Force to drop and recreate."
Write-Message-Level Warning -Message "Integration services catalog environment $environment exists in folder $($f.Name) at destination. Use -Force to drop and recreate."
606
+
$copyEnvStatus.Status="Skipped"
607
+
$copyEnvStatus.Notes="Integration services catalog environment exists in folder $($f.Name) at destination. Use -Force to drop and recreate."
If ($Pscmdlet.ShouldProcess($destinstance,"Dropping existing environment $environment and deploying environment $environment from folder $($f.Name)")) {
Write-Message-Level Warning -Message "Integration services catalog environment $($env.Name) exists in folder $($curFolder.Name) at destination. Use -Force to drop and recreate."
652
+
$copyEnvStatus.Status="Skipped"
653
+
$copyEnvStatus.Notes="Integration services catalog environment $($env.Name) exists in folder $($curFolder.Name) at destination. Use -Force to drop and recreate."
0 commit comments