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-DbaPolicyManagement.ps1
+54-5Lines changed: 54 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ function Copy-DbaPolicyManagement {
4
4
Copies Policy-Based Management policies, conditions, and categories between SQL Server instances
5
5
6
6
.DESCRIPTION
7
-
Transfers your entire Policy-Based Management framework from one SQL Server instance to another, including custom policies, conditions, and categories. This streamlines environment standardization and disaster recovery scenarios where you need identical compliance policies across multiple servers.
7
+
Transfers your entire Policy-Based Management framework from one SQL Server instance to another, including custom policies, conditions, object sets, and categories. This streamlines environment standardization and disaster recovery scenarios where you need identical compliance policies across multiple servers.
8
8
9
-
By default, all non-system policiesand conditions are copied. Existing objects on the destination are skipped unless -Force is used to overwrite them. You can selectively copy specific policies or conditions using the include/exclude parameters, which provide auto-completion from the source server.
9
+
By default, all non-system policies, conditions, and object sets are copied. Object sets are migrated after conditions and before policies to ensure policy dependencies are satisfied. Existing objects on the destination are skipped unless -Force is used to overwrite them. You can selectively copy specific policies or conditions using the include/exclude parameters, which provide auto-completion from the source server.
10
10
11
11
.PARAMETERSource
12
12
Specifies the source SQL Server instance containing the Policy-Based Management objects to copy. Must be SQL Server 2008 or higher with sysadmin access.
@@ -71,14 +71,14 @@ function Copy-DbaPolicyManagement {
71
71
.OUTPUTS
72
72
PSCustomObject
73
73
74
-
Returns one object per policy category, condition, and policy successfully copied or skipped. All objects use a common schema with the following properties:
74
+
Returns one object per policy category, condition, object set, and policy successfully copied or skipped. All objects use a common schema with the following properties:
0 commit comments