├── Call-GPOExport.ps1 ├── Call-GPOImport.ps1 ├── GPOMigration ├── GPOMigration.psd1 ├── GPOMigration.psm1 └── GPOMigration.psm1-Help.xml ├── MigTable_sample.csv └── README.md /Call-GPOExport.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoateePFE/GPOMigration/6aa7567fcbbbc373b076a45af6b29df7041ea0be/Call-GPOExport.ps1 -------------------------------------------------------------------------------- /Call-GPOImport.ps1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoateePFE/GPOMigration/6aa7567fcbbbc373b076a45af6b29df7041ea0be/Call-GPOImport.ps1 -------------------------------------------------------------------------------- /GPOMigration/GPOMigration.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoateePFE/GPOMigration/6aa7567fcbbbc373b076a45af6b29df7041ea0be/GPOMigration/GPOMigration.psd1 -------------------------------------------------------------------------------- /GPOMigration/GPOMigration.psm1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoateePFE/GPOMigration/6aa7567fcbbbc373b076a45af6b29df7041ea0be/GPOMigration/GPOMigration.psm1 -------------------------------------------------------------------------------- /GPOMigration/GPOMigration.psm1-Help.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Enable-ADSystemOnlyChange 6 | 7 | Modifies the domain controller registry to enable/disable WMI object creation. 8 | HKLM:\System\CurrentControlSet\Services\NTDS\Parameters 9 | "Allow System Only Change", DWORD, 1 or 0 10 | 11 | 12 | 13 | 14 | Enable 15 | ADSystemOnlyChange 16 | 17 | 18 | 19 | 20 | Modifies the domain controller registry to enable/disable WMI object creation. 21 | Restarts either the NTDS service or the server. 22 | This command must run locally on the domain controller where the 23 | GPOs will be imported. You only need to execute this function if WMI filter 24 | creation via script has failed. If you continue, the process will finish with 25 | either restarting the NTDS service or rebooting the server. 26 | 27 | 28 | 29 | Enable-ADSystemOnlyChange 30 | 31 | Disable 32 | 33 | Switch to set the value to 0 instead of 1. 34 | 35 | SwitchParameter 36 | 37 | 38 | 39 | 40 | 41 | Disable 42 | 43 | Switch to set the value to 0 instead of 1. 44 | 45 | SwitchParameter 46 | 47 | SwitchParameter 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | Modified from Bin Yi's code on TechNet Script Center: 83 | http://gallery.technet.microsoft.com/scriptcenter/Group-Policy-WMI-filter-38a188f3 84 | 85 | 86 | 87 | 88 | -------------------------- Example 1 -------------------------- 89 | 90 | 91 | 92 | PS C:\> Enable-ADSystemOnlyChange 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------- Example 2 -------------------------- 104 | 105 | 106 | 107 | PS C:\> Enable-ADSystemOnlyChange -Disable 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | http://aka.ms/GoateePFE 121 | 122 | 123 | 124 | http://gallery.technet.microsoft.com/scriptcenter/Group-Policy-WMI-filter-38a188f3 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | Export-GPPermission 133 | 134 | Gets all specified GPO permissions and sends them to a CSV file for import later. 135 | 136 | 137 | 138 | 139 | Export 140 | GPPermission 141 | 142 | 143 | 144 | 145 | Gets all specified GPO permissions and sends them to a CSV file for import later. 146 | 147 | 148 | 149 | Export-GPPermission 150 | 151 | All 152 | 153 | Switch to export all GPOs in the source domain. 154 | 155 | SwitchParameter 156 | 157 | 158 | SrceDomain 159 | 160 | Name of source domain to target. 161 | 162 | String 163 | 164 | 165 | SrceServer 166 | 167 | Name of source domain DC to target. 168 | 169 | String 170 | 171 | 172 | Path 173 | 174 | The folder path of the GPO backup folder. The GPPermissions.csv file will go here. 175 | 176 | String 177 | 178 | 179 | 180 | Export-GPPermission 181 | 182 | DisplayName 183 | 184 | A string or array of strings specifying the GPOs to backup. This can be piped from Get-GPO. 185 | 186 | String[] 187 | 188 | 189 | SrceDomain 190 | 191 | Name of source domain to target. 192 | 193 | String 194 | 195 | 196 | SrceServer 197 | 198 | Name of source domain DC to target. 199 | 200 | String 201 | 202 | 203 | Path 204 | 205 | The folder path of the GPO backup folder. The GPPermissions.csv file will go here. 206 | 207 | String 208 | 209 | 210 | 211 | 212 | 213 | All 214 | 215 | Switch to export all GPOs in the source domain. 216 | 217 | SwitchParameter 218 | 219 | SwitchParameter 220 | 221 | 222 | 223 | 224 | 225 | SrceDomain 226 | 227 | Name of source domain to target. 228 | 229 | String 230 | 231 | String 232 | 233 | 234 | 235 | 236 | 237 | SrceServer 238 | 239 | Name of source domain DC to target. 240 | 241 | String 242 | 243 | String 244 | 245 | 246 | 247 | 248 | 249 | Path 250 | 251 | The folder path of the GPO backup folder. The GPPermissions.csv file will go here. 252 | 253 | String 254 | 255 | String 256 | 257 | 258 | 259 | 260 | 261 | DisplayName 262 | 263 | A string or array of strings specifying the GPOs to backup. This can be piped from Get-GPO. 264 | 265 | String[] 266 | 267 | String[] 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | The GroupPolicy module cmdlet Get-GPPermission shows access types of ALLOW and DENY. Howerver, Set-GPPermissions does not support the DENY access type. Therefore we will set it directly using .NET. However, then we must sync the permissions with SYSVOL through the method MakeACLConsistent. 303 | The GPO backup XML files have the permissions from the GPO, but there is not friendly way to get the permissions from the encoded SDDL. 304 | 305 | 306 | 307 | 308 | -------------------------- Example 1 -------------------------- 309 | 310 | 311 | 312 | PS C:\> Export-GPPermission -SrceDomain $SrceDomain -SrceServer $SrceServer -DisplayName "Starter User" -Path $BackupPath 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | http://aka.ms/GoateePFE 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | Export-WMIFilter 334 | 335 | Exports named WMI filter objects to a CSV file. 336 | 337 | 338 | 339 | 340 | Export 341 | WMIFilter 342 | 343 | 344 | 345 | 346 | Exports named WMI filter objects to a CSV file. This CSV file is used for the import in the destination environment. 347 | 348 | 349 | 350 | Export-WMIFilter 351 | 352 | Name 353 | 354 | Name of the WMI filter(s) to export. 355 | 356 | String[] 357 | 358 | 359 | SrceServer 360 | 361 | Name of source domain DC to target. 362 | 363 | String 364 | 365 | 366 | Path 367 | 368 | The folder path of the GPO backup folder. The WMIFilter.csv file will go here. 369 | 370 | String 371 | 372 | 373 | 374 | 375 | 376 | Name 377 | 378 | Name of the WMI filter(s) to export. 379 | 380 | String[] 381 | 382 | String[] 383 | 384 | 385 | 386 | 387 | 388 | SrceServer 389 | 390 | Name of source domain DC to target. 391 | 392 | String 393 | 394 | String 395 | 396 | 397 | 398 | 399 | 400 | Path 401 | 402 | The folder path of the GPO backup folder. The WMIFilter.csv file will go here. 403 | 404 | String 405 | 406 | String 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | -------------------------- Example 1 -------------------------- 447 | 448 | 449 | 450 | PS C:\> Export-WMIFilter -Name "Windows Server 2003" -SrceServer $SrceServer -Path $GPOBackupPath 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | -------------------------- Example 2 -------------------------- 462 | 463 | 464 | 465 | PS C:\> Export-WMIFilter -Name "Windows Server 2003","Windows Server 2008" -SrceServer $SrceServer -Path $GPOBackupPath 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | http://aka.ms/GoateePFE 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | Import-GPLink 487 | 488 | Attempts to link imported GPOs from the backup to the same OUs (or domain or site) in the destination domain. 489 | 490 | 491 | 492 | 493 | Import 494 | GPLink 495 | 496 | 497 | 498 | 499 | Reads GPO link information from the backup. 500 | Translates the distinguished name link path using the migration table CSV file. 501 | Attempts to find the same distinguished name path in the destination domain. 502 | Links the GPO. 503 | Sets the same flags for the link (enforced, enabled, etc.). 504 | 505 | 506 | 507 | Import-GPLink 508 | 509 | DestDomain 510 | 511 | Name of destination domain to target. 512 | 513 | String 514 | 515 | 516 | DestServer 517 | 518 | Name of destination domain DC to target. 519 | 520 | String 521 | 522 | 523 | BackupPath 524 | 525 | The base folder path of the GPO backup folder. 526 | 527 | String 528 | 529 | 530 | MigTableCSVPath 531 | 532 | Full path to the CSV file with search/replace values for automatic migration table generation. 533 | 534 | String 535 | 536 | 537 | 538 | 539 | 540 | DestDomain 541 | 542 | Name of destination domain to target. 543 | 544 | String 545 | 546 | String 547 | 548 | 549 | 550 | 551 | 552 | DestServer 553 | 554 | Name of destination domain DC to target. 555 | 556 | String 557 | 558 | String 559 | 560 | 561 | 562 | 563 | 564 | BackupPath 565 | 566 | The base folder path of the GPO backup folder. 567 | 568 | String 569 | 570 | String 571 | 572 | 573 | 574 | 575 | 576 | MigTableCSVPath 577 | 578 | Full path to the CSV file with search/replace values for automatic migration table generation. 579 | 580 | String 581 | 582 | String 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | Destination domain name and server name, path to GPO backup folder, path of GPO migration table CSV file. 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | Double check the link precedence after running this. Compare source and destination GPO links. GPO link order is not guaranteed to match in the destination domain. In other words, if multiple GPOs are linked to one OU in the source domain, then the same link precedence order is not guaranteed in the destination domain. 618 | In GPO documentation the place where GPOs are linked (OU, domain, site) is called Scope of Management (SOM). 619 | 620 | 621 | 622 | 623 | -------------------------- Example 1 -------------------------- 624 | 625 | 626 | 627 | PS C:\> Import-GPLink -DestDomain $DestDomain -DestServer $DestServer -BackupPath $BackupPath -MigTableCSVPath $MigTableCSVPath 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | http://aka.ms/GoateePFE 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | Import-GPPermission 649 | 650 | Applies permissions to a GPO based on a CSV export file and GPO migration table. 651 | 652 | 653 | 654 | 655 | Import 656 | GPPermission 657 | 658 | 659 | 660 | 661 | Reads GPO permissions from a CSV export file, adjusts accounts according to the migration table, applies them to the GPO of the same name in the destination domain, then synchronizes permissions to SYSVOL. 662 | 663 | 664 | 665 | Import-GPPermission 666 | 667 | DestDomain 668 | 669 | Name of destination domain to target. 670 | 671 | String 672 | 673 | 674 | DestServer 675 | 676 | Name of destination domain DC to target. 677 | 678 | String 679 | 680 | 681 | DisplayName 682 | 683 | A string or array of strings specifying the GPO names for permission import. This can be piped from Get-GPO. 684 | 685 | String[] 686 | 687 | 688 | Path 689 | 690 | Path of the GPO permission backup CSV file. 691 | 692 | String 693 | 694 | 695 | MigTablePath 696 | 697 | Path to the GPO migration table file (*.migtable). 698 | 699 | String 700 | 701 | 702 | 703 | 704 | 705 | DestDomain 706 | 707 | Name of destination domain to target. 708 | 709 | String 710 | 711 | String 712 | 713 | 714 | 715 | 716 | 717 | DestServer 718 | 719 | Name of destination domain DC to target. 720 | 721 | String 722 | 723 | String 724 | 725 | 726 | 727 | 728 | 729 | DisplayName 730 | 731 | A string or array of strings specifying the GPO names for permission import. This can be piped from Get-GPO. 732 | 733 | String[] 734 | 735 | String[] 736 | 737 | 738 | 739 | 740 | 741 | Path 742 | 743 | Path of the GPO permission backup CSV file. 744 | 745 | String 746 | 747 | String 748 | 749 | 750 | 751 | 752 | 753 | MigTablePath 754 | 755 | Path to the GPO migration table file (*.migtable). 756 | 757 | String 758 | 759 | String 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | Destination domain name and server name, path to GPO permissions CSV export, path to GPO migration table. 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | This cmdlet sets permissions directly on the Active Directory Group Policy Object(s). Once all Access Control Entries (ACEs) have been applied to the Access Control List (ACL), them it synchronizes permissions to SYSVOL. 795 | This cmdlet sets both Allow and Deny permissions. The GroupPolicy module cmdlet Set-GPPermission does not support setting Deny permissions. 796 | 797 | 798 | 799 | 800 | -------------------------- Example 1 -------------------------- 801 | 802 | 803 | 804 | PS C:\> Import-GPPermission -DestDomain $DestDomain -DestServer $DestServer -DisplayName $GPMBackup.GPODisplayName -Path "$BackupPath\GPPermissions.csv" -MigTablePath $MigTablePath 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | http://aka.ms/GoateePFE 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | Import-WMIFilter 826 | 827 | Imports WMI filters from the WMIFilter.csv file to the destination domain. 828 | 829 | 830 | 831 | 832 | Import 833 | WMIFilter 834 | 835 | 836 | 837 | 838 | Imports WMI filters from the WMIFilter.csv file to the destination domain. 839 | 840 | 841 | 842 | Import-WMIFilter 843 | 844 | DestServer 845 | 846 | Name of destination domain DC to target. 847 | 848 | String 849 | 850 | 851 | Path 852 | 853 | Path to the GPO backup folder containing WMIFilter.csv. 854 | 855 | String 856 | 857 | 858 | 859 | 860 | 861 | DestServer 862 | 863 | Name of destination domain DC to target. 864 | 865 | String 866 | 867 | String 868 | 869 | 870 | 871 | 872 | 873 | Path 874 | 875 | Path to the GPO backup folder containing WMIFilter.csv. 876 | 877 | String 878 | 879 | String 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | Destination server name, path to GPO backup folder. 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | If the import generates an error, then you may need to run Enable-ADSystemOnlyChange on the DC before the import will work. 915 | Modified from Bin Yi's code on TechNet Script Center: 916 | http://gallery.technet.microsoft.com/scriptcenter/Group-Policy-WMI-filter-38a188f3 917 | 918 | 919 | 920 | 921 | -------------------------- Example 1 -------------------------- 922 | 923 | 924 | 925 | PS C:\> Import-WMIFilter -DestServer $DestServer -Path "$BackupPath\GPPermissions.csv" 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | 936 | 937 | 938 | http://aka.ms/GoateePFE 939 | 940 | 941 | 942 | http://gallery.technet.microsoft.com/scriptcenter/Group-Policy-WMI-filter-38a188f3 943 | 944 | 945 | 946 | 947 | 948 | 949 | 950 | Invoke-BackupGPO 951 | 952 | Creates a GPO backup from the specified domain and server. Can backup a single GPO, a list of GPOs, or all GPOs. 953 | 954 | 955 | 956 | 957 | Invoke 958 | BackupGPO 959 | 960 | 961 | 962 | 963 | Creates a backup folder. 964 | Calls the Backup-GPO cmdlet with parameters specified. 965 | Returns the backup folder for use in following migration steps. 966 | 967 | 968 | 969 | 970 | Invoke-BackupGPO 971 | 972 | All 973 | 974 | Switch to backup all GPOs in the source domain. 975 | 976 | SwitchParameter 977 | 978 | 979 | SrceDomain 980 | 981 | Name of source domain to target. 982 | 983 | String 984 | 985 | 986 | SrceServer 987 | 988 | Name of source domain DC to target. 989 | 990 | String 991 | 992 | 993 | Path 994 | 995 | The base folder path or working folder where you want the GPO backup folder created. The GPO backup folder name is automatically generated and created under this path. 996 | 997 | String 998 | 999 | 1000 | 1001 | Invoke-BackupGPO 1002 | 1003 | DisplayName 1004 | 1005 | A string or array of strings specifying the GPOs to backup. This can be piped from Get-GPO. 1006 | 1007 | String[] 1008 | 1009 | 1010 | SrceDomain 1011 | 1012 | Name of source domain to target. 1013 | 1014 | String 1015 | 1016 | 1017 | SrceServer 1018 | 1019 | Name of source domain DC to target. 1020 | 1021 | String 1022 | 1023 | 1024 | Path 1025 | 1026 | The base folder path or working folder where you want the GPO backup folder created. The GPO backup folder name is automatically generated and created under this path. 1027 | 1028 | String 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | All 1035 | 1036 | Switch to backup all GPOs in the source domain. 1037 | 1038 | SwitchParameter 1039 | 1040 | SwitchParameter 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | SrceDomain 1047 | 1048 | Name of source domain to target. 1049 | 1050 | String 1051 | 1052 | String 1053 | 1054 | 1055 | 1056 | 1057 | 1058 | SrceServer 1059 | 1060 | Name of source domain DC to target. 1061 | 1062 | String 1063 | 1064 | String 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | Path 1071 | 1072 | The base folder path or working folder where you want the GPO backup folder created. The GPO backup folder name is automatically generated and created under this path. 1073 | 1074 | String 1075 | 1076 | String 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | DisplayName 1083 | 1084 | A string or array of strings specifying the GPOs to backup. This can be piped from Get-GPO. 1085 | 1086 | String[] 1087 | 1088 | String[] 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | Source domain name and DC name. 1101 | Path for backup creation. 1102 | List of GPO DisplayNames. 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | 1112 | 1113 | 1114 | String path to backup folder. 1115 | 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | 1128 | 1129 | 1130 | -------------------------- Example 1 -------------------------- 1131 | 1132 | 1133 | 1134 | PS C:\> Invoke-BackupGPO -SrceDomain $SrceDomain -SrceServer $SrceServer -DisplayName "Starter User" -Path $Path 1135 | 1136 | 1137 | 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | -------------------------- Example 2 -------------------------- 1146 | 1147 | 1148 | 1149 | PS C:\> Invoke-BackupGPO -SrceDomain $SrceDomain -SrceServer $SrceServer -DisplayName "Starter User","Starter Computer" -Path $Path 1150 | 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | 1160 | -------------------------- Example 3 -------------------------- 1161 | 1162 | 1163 | 1164 | PS C:\> Invoke-BackupGPO -SrceDomain $SrceDomain -SrceServer $SrceServer -All -Path $Path 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | -------------------------- Example 4 -------------------------- 1176 | 1177 | 1178 | 1179 | PS C:\> $GPOs = Get-GPO -All | ? {$_.DisplayName -like '*start*'} | Select-Object -ExpandProperty DisplayName 1180 | Invoke-BackupGPO -SrceDomain $SrceDomain -SrceServer $SrceServer -DisplayName $GPOs -Path $Path 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | http://aka.ms/GoateePFE 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | Invoke-ImportGPO 1202 | 1203 | Imports all GPOs contained in a GPO backup. 1204 | 1205 | 1206 | 1207 | 1208 | Invoke 1209 | ImportGPO 1210 | 1211 | 1212 | 1213 | 1214 | Enumerates GPOs from a backup and calls Import-GPO for each one. 1215 | Optionally imports the GPO permissions where the same accounts exist in the destination domain, using the migration table for reference. 1216 | 1217 | 1218 | 1219 | Invoke-ImportGPO 1220 | 1221 | DestDomain 1222 | 1223 | Name of destination domain to target. 1224 | 1225 | String 1226 | 1227 | 1228 | DestServer 1229 | 1230 | Name of destination domain DC to target. 1231 | 1232 | String 1233 | 1234 | 1235 | BackupPath 1236 | 1237 | The base folder path of the GPO backup. 1238 | 1239 | String 1240 | 1241 | 1242 | MigTablePath 1243 | 1244 | Path to the GPO migration table file (*.migtable). 1245 | 1246 | String 1247 | 1248 | 1249 | CopyACL 1250 | 1251 | Copies the Access Control List (ACL) of the source GPO to the destination (target) GPO. 1252 | 1253 | SwitchParameter 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | DestDomain 1260 | 1261 | Name of destination domain to target. 1262 | 1263 | String 1264 | 1265 | String 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | DestServer 1272 | 1273 | Name of destination domain DC to target. 1274 | 1275 | String 1276 | 1277 | String 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | BackupPath 1284 | 1285 | The base folder path of the GPO backup. 1286 | 1287 | String 1288 | 1289 | String 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | MigTablePath 1296 | 1297 | Path to the GPO migration table file (*.migtable). 1298 | 1299 | String 1300 | 1301 | String 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | CopyACL 1308 | 1309 | Copies the Access Control List (ACL) of the source GPO to the destination (target) GPO. 1310 | 1311 | SwitchParameter 1312 | 1313 | SwitchParameter 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | Destination domain name and server name, path to GPO backup, switch for copying the ACL. 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | The GPO permissions export is in a separate CSV file in the GPO backup folder. 1349 | You may see the same account listed as applying permissions multiple times. This is by design. View the advanced security of a GPO to see why this occurs. 1350 | GPO import may fail if the migration table contains entries that do not exist in the destination domain. 1351 | 1352 | 1353 | 1354 | 1355 | -------------------------- Example 1 -------------------------- 1356 | 1357 | 1358 | 1359 | PS C:\> Invoke-ImportGPO -DestDomain $DestDomain -DestServer $DestServer -BackupPath $BackupPath -MigTablePath $MigTablePath -CopyACL 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | http://aka.ms/GoateePFE 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | Invoke-RemoveGPO 1381 | 1382 | Reads a list of GPO display names from a backup and removes all of them from the destination domain. 1383 | 1384 | 1385 | 1386 | 1387 | Invoke 1388 | RemoveGPO 1389 | 1390 | 1391 | 1392 | 1393 | Use this cmdlet to wipe the destination environment for a clean import. This only affects GPOs with the same display name as those in the backup. 1394 | 1395 | 1396 | 1397 | Invoke-RemoveGPO 1398 | 1399 | DestDomain 1400 | 1401 | Name of destination domain to target. 1402 | 1403 | String 1404 | 1405 | 1406 | DestServer 1407 | 1408 | Name of destination domain DC to target. 1409 | 1410 | String 1411 | 1412 | 1413 | BackupPath 1414 | 1415 | The base folder path of the GPO backup folder. 1416 | 1417 | String 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | DestDomain 1424 | 1425 | Name of destination domain to target. 1426 | 1427 | String 1428 | 1429 | String 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | DestServer 1436 | 1437 | Name of destination domain DC to target. 1438 | 1439 | String 1440 | 1441 | String 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | BackupPath 1448 | 1449 | The base folder path of the GPO backup folder. 1450 | 1451 | String 1452 | 1453 | String 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | 1465 | Destination domain name and server name, path to GPO backup folder. 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | -------------------------- Example 1 -------------------------- 1494 | 1495 | 1496 | 1497 | PS C:\> Invoke-RemoveGPO -DestDomain $DestDomain -DestServer $DestServer -BackupPath $BackupPath 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | http://aka.ms/GoateePFE 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | New-GPOMigrationTable 1519 | 1520 | Creates a customized GPO migration table file. 1521 | 1522 | 1523 | 1524 | 1525 | New 1526 | GPOMigrationTable 1527 | 1528 | 1529 | 1530 | 1531 | Instead of manually editing migration tables, use a CSV template of search/replace values to update the migration table by code. 1532 | The search value is in the Source column. The replace value is in the Destination column. The type column is related to the data type that appears in a standard migration table file and is either "Domain" or "UNC". 1533 | 1534 | Following is a sample CSV: 1535 | Source,Destination,Type 1536 | "wingtiptoys.local","cohovineyard.com","Domain" 1537 | "wingtiptoys","cohovineyard","Domain" 1538 | "\wingtiptoys.local\","\cohovineyard.com\","UNC" 1539 | "\wingtiptoys\","\cohovineyard\","UNC" 1540 | 1541 | 1542 | 1543 | New-GPOMigrationTable 1544 | 1545 | DestDomain 1546 | 1547 | Name of destination domain to target. 1548 | 1549 | String 1550 | 1551 | 1552 | Path 1553 | 1554 | The base folder path or working folder where you want the migration table created. Defaults to current folder. 1555 | 1556 | String 1557 | 1558 | 1559 | BackupPath 1560 | 1561 | The base folder path of the GPO backup folder. 1562 | 1563 | String 1564 | 1565 | 1566 | MigTableCSVPath 1567 | 1568 | Full path to the CSV file with search/replace values for automatic migration table generation. 1569 | 1570 | String 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | DestDomain 1577 | 1578 | Name of destination domain to target. 1579 | 1580 | String 1581 | 1582 | String 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | Path 1589 | 1590 | The base folder path or working folder where you want the migration table created. Defaults to current folder. 1591 | 1592 | String 1593 | 1594 | String 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | BackupPath 1601 | 1602 | The base folder path of the GPO backup folder. 1603 | 1604 | String 1605 | 1606 | String 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | MigTableCSVPath 1613 | 1614 | Full path to the CSV file with search/replace values for automatic migration table generation. 1615 | 1616 | String 1617 | 1618 | String 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | Destination domain name, working folder path, GPO backup path, CSV migration file path. 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | GPO migration table file named like "source-to-destination.migtable". 1643 | Returns the path to the GPO migration table created. 1644 | 1645 | 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | The source domain name is pulled from the GPO backup. 1655 | Double check universal groups when working with child domains. 1656 | You can optionally open the new migration table in the GUI and edit it as desired. 1657 | 1658 | 1659 | 1660 | 1661 | -------------------------- Example 1 -------------------------- 1662 | 1663 | 1664 | 1665 | PS C:\> $MigTablePath = New-GPOMigrationTable -DestDomain $DestDomain -Path $Path -BackupPath $BackupPath -MigTableCSVPath $MigTableCSVPath 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 | http://aka.ms/GoateePFE 1679 | 1680 | 1681 | 1682 | http://msdn.microsoft.com/en-us/library/windows/desktop/aa814147(v=vs.85).aspx 1683 | 1684 | 1685 | 1686 | http://msdn.microsoft.com/en-us/library/windows/desktop/aa814153(v=vs.85).aspx 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | Set-GPWMIFilterFromBackup 1695 | 1696 | Attempts to link imported GPOs from the backup to the same WMIFilters in the destination domain. 1697 | 1698 | 1699 | 1700 | 1701 | Set 1702 | GPWMIFilterFromBackup 1703 | 1704 | 1705 | 1706 | 1707 | Reads GPO WMI filter information from the backup. 1708 | Attempts to find the same WMI display name in the destination domain. 1709 | Links the WMI filter. 1710 | 1711 | 1712 | 1713 | Set-GPWMIFilterFromBackup 1714 | 1715 | DestDomain 1716 | 1717 | FQDN of destination domain to target. 1718 | 1719 | String 1720 | 1721 | 1722 | DestServer 1723 | 1724 | FQDN of destination domain DC to target. 1725 | 1726 | String 1727 | 1728 | 1729 | BackupPath 1730 | 1731 | The base folder path of the GPO backup folder. 1732 | 1733 | String 1734 | 1735 | 1736 | 1737 | 1738 | 1739 | DestDomain 1740 | 1741 | FQDN of destination domain to target. 1742 | 1743 | String 1744 | 1745 | String 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | DestServer 1752 | 1753 | FQDN of destination domain DC to target. 1754 | 1755 | String 1756 | 1757 | String 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | BackupPath 1764 | 1765 | The base folder path of the GPO backup folder. 1766 | 1767 | String 1768 | 1769 | String 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 1777 | 1778 | 1779 | 1780 | 1781 | Destination domain name and server name, path to GPO backup folder. 1782 | 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 1794 | 1795 | 1796 | 1797 | 1798 | 1799 | 1800 | 1801 | 1802 | 1803 | 1804 | 1805 | 1806 | 1807 | 1808 | 1809 | -------------------------- Example 1 -------------------------- 1810 | 1811 | 1812 | 1813 | PS C:\> Set-GPWMIFilterFromBackup -DestDomain $DestDomain -DestServer $DestServer -BackupPath $BackupPath 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 | 1821 | 1822 | 1823 | 1824 | 1825 | 1826 | http://aka.ms/GoateePFE 1827 | 1828 | 1829 | 1830 | 1831 | 1832 | 1833 | 1834 | Show-GPOMigrationTable 1835 | 1836 | Displays the contents of a GPO migration table file. 1837 | 1838 | 1839 | 1840 | 1841 | Show 1842 | GPOMigrationTable 1843 | 1844 | 1845 | 1846 | 1847 | Displays the contents of a GPO migration table file. 1848 | 1849 | 1850 | 1851 | Show-GPOMigrationTable 1852 | 1853 | Path 1854 | 1855 | The path to the GPO migration table file (*.migtable). 1856 | 1857 | String 1858 | 1859 | 1860 | 1861 | 1862 | 1863 | Path 1864 | 1865 | The path to the GPO migration table file (*.migtable). 1866 | 1867 | String 1868 | 1869 | String 1870 | 1871 | 1872 | 1873 | 1874 | 1875 | 1876 | 1877 | 1878 | 1879 | 1880 | 1881 | GPO migration table file path. 1882 | 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | 1889 | 1890 | 1891 | 1892 | 1893 | Returns the contents of the GPO migration table file and replaces numerical constants with their string values. 1894 | 1895 | 1896 | 1897 | 1898 | 1899 | 1900 | 1901 | 1902 | 1903 | 1904 | The GPO migration table file does not have to be generated by this module. The cmdlet will display any *.migtable file. 1905 | 1906 | 1907 | 1908 | 1909 | -------------------------- Example 1 -------------------------- 1910 | 1911 | 1912 | 1913 | PS C:\> Show-GPOMigrationTable -Path .\Wingtiptoys.local-to-CohoVineyard.com.migtable 1914 | 1915 | 1916 | 1917 | 1918 | 1919 | 1920 | 1921 | 1922 | 1923 | 1924 | -------------------------- Example 2 -------------------------- 1925 | 1926 | 1927 | 1928 | PS C:\> Show-GPOMigrationTable -Path $MigTablePath | Format-Table -AutoSize 1929 | 1930 | Source DestOption Type Destination 1931 | ------ ---------- ---- ----------- 1932 | Administrators SameAsSource Unknown 1933 | Domain Admins@wingtiptoys.local Set GlobalGroup Domain Admins@cohovineyard.com 1934 | fsogroup@wingtiptoys.local Set GlobalGroup fsogroup@cohovineyard.com 1935 | Enterprise Admins@wingtiptoys.local Set UniversalGroup Enterprise Admins@cohovineyard.com 1936 | anlan@wingtiptoys.local Set User anlan@cohovineyard.com 1937 | anhill@wingtiptoys.local Set User anhill@cohovineyard.com 1938 | 1939 | 1940 | 1941 | 1942 | 1943 | 1944 | 1945 | 1946 | 1947 | 1948 | http://aka.ms/GoateePFE 1949 | 1950 | 1951 | 1952 | http://technet.microsoft.com/en-us/library/cc739066(v=WS.10).aspx 1953 | 1954 | 1955 | 1956 | 1957 | 1958 | 1959 | 1960 | Start-GPOExport 1961 | 1962 | Wrapper function to call Backup-GPO, Export-GPPermission, and Export-WMIFilter. 1963 | 1964 | 1965 | 1966 | 1967 | Start 1968 | GPOExport 1969 | 1970 | 1971 | 1972 | 1973 | Gives you "one big button" for the export activity. 1974 | 1975 | 1976 | 1977 | Start-GPOExport 1978 | 1979 | SrceDomain 1980 | 1981 | Name of source domain to target. 1982 | 1983 | String 1984 | 1985 | 1986 | SrceServer 1987 | 1988 | Name of source domain DC to target. 1989 | 1990 | String 1991 | 1992 | 1993 | DisplayName 1994 | 1995 | A string or array of strings specifying the GPOs to backup. 1996 | 1997 | String[] 1998 | 1999 | 2000 | Path 2001 | 2002 | The base folder path or working folder where you want the GPO backup folder created. The GPO backup folder name is automatically generated and created under this path. 2003 | 2004 | String 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | SrceDomain 2011 | 2012 | Name of source domain to target. 2013 | 2014 | String 2015 | 2016 | String 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | SrceServer 2023 | 2024 | Name of source domain DC to target. 2025 | 2026 | String 2027 | 2028 | String 2029 | 2030 | 2031 | 2032 | 2033 | 2034 | DisplayName 2035 | 2036 | A string or array of strings specifying the GPOs to backup. 2037 | 2038 | String[] 2039 | 2040 | String[] 2041 | 2042 | 2043 | 2044 | 2045 | 2046 | Path 2047 | 2048 | The base folder path or working folder where you want the GPO backup folder created. The GPO backup folder name is automatically generated and created under this path. 2049 | 2050 | String 2051 | 2052 | String 2053 | 2054 | 2055 | 2056 | 2057 | 2058 | 2059 | 2060 | 2061 | 2062 | 2063 | 2064 | Source domain name and DC name. 2065 | List of GPO DisplayNames. 2066 | Path for backup creation. 2067 | 2068 | 2069 | 2070 | 2071 | 2072 | 2073 | 2074 | 2075 | 2076 | 2077 | 2078 | 2079 | 2080 | 2081 | 2082 | 2083 | 2084 | 2085 | 2086 | 2087 | 2088 | 2089 | 2090 | 2091 | 2092 | 2093 | 2094 | -------------------------- Example 1 -------------------------- 2095 | 2096 | 2097 | 2098 | PS C:\> Start-GPOExport ` 2099 | -SrceDomain $SrceDomain ` 2100 | -SrceServer $SrceServer ` 2101 | -DisplayName $DisplayName ` 2102 | -Path $Path 2103 | 2104 | In this example you can modify the Where-Object line to choose only the GPOs you want to backup. 2105 | 2106 | Set-Location "C:\Temp\GPOMigration" 2107 | 2108 | Import-Module GroupPolicy 2109 | Import-Module ActiveDirectory 2110 | Import-Module ".\GPOMigration.psm1" -Force 2111 | 2112 | # This path must be absolute, not relative 2113 | $Path = $PWD # Current folder specified in Set-Location above 2114 | $SrceDomain = 'wingtiptoys.local' 2115 | $SrceServer = 'dca.wingtiptoys.local' 2116 | $DisplayName = Get-GPO -All -Domain $SrceDomain -Server $SrceServer | 2117 | Where-Object {$_.DisplayName -like '*test*'} | 2118 | Select-Object -ExpandProperty DisplayName 2119 | 2120 | Start-GPOExport ` 2121 | -SrceDomain $SrceDomain ` 2122 | -SrceServer $SrceServer ` 2123 | -DisplayName $DisplayName ` 2124 | -Path $Path 2125 | 2126 | 2127 | 2128 | 2129 | 2130 | 2131 | 2132 | 2133 | 2134 | 2135 | http://aka.ms/GoateePFE 2136 | 2137 | 2138 | 2139 | 2140 | 2141 | 2142 | 2143 | Start-GPOImport 2144 | 2145 | Wrapper function to conveniently call all import functions in the proper order. 2146 | 2147 | 2148 | 2149 | 2150 | Start 2151 | GPOImport 2152 | 2153 | 2154 | 2155 | 2156 | Gives you "one big button" for the import activity. 2157 | New-GPOMigrationTable 2158 | Show-GPOMigrationTable 2159 | Test-GPOMigrationTable 2160 | Invoke-RemoveGPO 2161 | Invoke-ImportGPO -CopyACL 2162 | Import-WMIFilter 2163 | Set-GPWMIFilterFromBackup 2164 | Import-GPLink 2165 | This calling function is provided as a template with the intention that you will selectively comment out or adjust the pieces to meet your needs. 2166 | 2167 | 2168 | 2169 | Start-GPOImport 2170 | 2171 | DestDomain 2172 | 2173 | FQDN of destination domain to target. 2174 | 2175 | String 2176 | 2177 | 2178 | DestServer 2179 | 2180 | FQDN of destination domain DC to target. 2181 | 2182 | String 2183 | 2184 | 2185 | Path 2186 | 2187 | Working path for migration tables and backups. 2188 | 2189 | String 2190 | 2191 | 2192 | BackupPath 2193 | 2194 | The base folder path of the GPO backup. 2195 | 2196 | String 2197 | 2198 | 2199 | MigTableCSVPath 2200 | 2201 | Path for migration table CSV mapping for automatic *.MigTable file generation. 2202 | 2203 | String 2204 | 2205 | 2206 | CopyACL 2207 | 2208 | Copies the Access Control List (ACL) of the source GPO to the destination (target) GPO. 2209 | 2210 | SwitchParameter 2211 | 2212 | 2213 | 2214 | 2215 | 2216 | DestDomain 2217 | 2218 | FQDN of destination domain to target. 2219 | 2220 | String 2221 | 2222 | String 2223 | 2224 | 2225 | 2226 | 2227 | 2228 | DestServer 2229 | 2230 | FQDN of destination domain DC to target. 2231 | 2232 | String 2233 | 2234 | String 2235 | 2236 | 2237 | 2238 | 2239 | 2240 | Path 2241 | 2242 | Working path for migration tables and backups. 2243 | 2244 | String 2245 | 2246 | String 2247 | 2248 | 2249 | 2250 | 2251 | 2252 | BackupPath 2253 | 2254 | The base folder path of the GPO backup. 2255 | 2256 | String 2257 | 2258 | String 2259 | 2260 | 2261 | 2262 | 2263 | 2264 | MigTableCSVPath 2265 | 2266 | Path for migration table CSV mapping for automatic *.MigTable file generation. 2267 | 2268 | String 2269 | 2270 | String 2271 | 2272 | 2273 | 2274 | 2275 | 2276 | CopyACL 2277 | 2278 | Copies the Access Control List (ACL) of the source GPO to the destination (target) GPO. 2279 | 2280 | SwitchParameter 2281 | 2282 | SwitchParameter 2283 | 2284 | 2285 | 2286 | 2287 | 2288 | 2289 | 2290 | 2291 | 2292 | 2293 | 2294 | Destination domain name and server name, working folder path, path to GPO backup, path to migration table CSV file, switch for copying the ACL. 2295 | 2296 | 2297 | 2298 | 2299 | 2300 | 2301 | 2302 | 2303 | 2304 | 2305 | 2306 | 2307 | 2308 | 2309 | 2310 | 2311 | 2312 | 2313 | 2314 | 2315 | 2316 | 2317 | You may see the same account listed as applying permissions multiple times. This is by design. View the advanced security of a GPO to see why this occurs. 2318 | GPO import may fail if the migration table contains entries that do not exist in the destination domain. 2319 | 2320 | 2321 | 2322 | 2323 | -------------------------- Example 1 -------------------------- 2324 | 2325 | 2326 | 2327 | PS C:\> Start-GPOImport ` 2328 | -DestDomain $DestDomain ` 2329 | -DestServer $DestServer ` 2330 | -Path $Path ` 2331 | -BackupPath $BackupPath ` 2332 | -MigTableCSVPath $MigTableCSVPath ` 2333 | -CopyACL 2334 | 2335 | Set-Location "C:\Temp\GPOMigration\" 2336 | 2337 | Import-Module GroupPolicy 2338 | Import-Module ActiveDirectory 2339 | Import-Module ".\GPOMigration.psm1" -Force 2340 | 2341 | # This path must be absolute, not relative 2342 | $Path = $PWD # Current folder specified in Set-Location above 2343 | $BackupPath = "$PWD\GPO Backup wingtiptoys.local 2014-04-23-16-37-31" 2344 | 2345 | $DestDomain = 'cohovineyard.com' 2346 | $DestServer = 'cvdcr2.cohovineyard.com' 2347 | $MigTableCSVPath = '.\MigTable_sample.csv' 2348 | 2349 | Start-GPOImport ` 2350 | -DestDomain $DestDomain ` 2351 | -DestServer $DestServer ` 2352 | -Path $Path ` 2353 | -BackupPath $BackupPath ` 2354 | -MigTableCSVPath $MigTableCSVPath ` 2355 | -CopyACL 2356 | 2357 | 2358 | 2359 | 2360 | 2361 | 2362 | 2363 | 2364 | 2365 | 2366 | http://aka.ms/GoateePFE 2367 | 2368 | 2369 | 2370 | 2371 | 2372 | 2373 | 2374 | Test-GPOMigrationTable 2375 | 2376 | Validates the entries in a GPO migration table. 2377 | 2378 | 2379 | 2380 | 2381 | Test 2382 | GPOMigrationTable 2383 | 2384 | 2385 | 2386 | 2387 | Validates whether destination accounts, groups, and/or UNC paths exist. 2388 | 2389 | 2390 | 2391 | Test-GPOMigrationTable 2392 | 2393 | Path 2394 | 2395 | 2396 | 2397 | String 2398 | 2399 | 2400 | 2401 | 2402 | 2403 | Path 2404 | 2405 | 2406 | 2407 | String 2408 | 2409 | String 2410 | 2411 | 2412 | 2413 | 2414 | 2415 | 2416 | 2417 | 2418 | 2419 | 2420 | 2421 | GPO migration table file path. 2422 | 2423 | 2424 | 2425 | 2426 | 2427 | 2428 | 2429 | 2430 | 2431 | 2432 | 2433 | Detailed findings for each migration table entry. 2434 | 2435 | 2436 | 2437 | 2438 | 2439 | 2440 | 2441 | 2442 | 2443 | 2444 | Requires connectivity and credentials to destination domain. 2445 | GPO import to destination will fail if there are invalid entries in the migration table. 2446 | You can optionally open the migration table in the GUI and edit it as desired. 2447 | 2448 | 2449 | 2450 | 2451 | -------------------------- Example 1 -------------------------- 2452 | 2453 | 2454 | 2455 | PS C:\> Test-GPOMigrationTable -Path .\Wingtiptoys.local-to-CohoVineyard.com.migtable | Format-List * 2456 | 2457 | 2458 | 2459 | 2460 | 2461 | 2462 | 2463 | 2464 | 2465 | 2466 | 2467 | 2468 | http://aka.ms/GoateePFE 2469 | 2470 | 2471 | 2472 | 2473 | -------------------------------------------------------------------------------- /MigTable_sample.csv: -------------------------------------------------------------------------------- 1 | Source,Destination,Type 2 | "wingtiptoys.local","cohovineyard.com","Domain" 3 | "wingtiptoys","cohovineyard","Domain" 4 | "\\wingtiptoys.local\","\\cohovineyard.com\","UNC" 5 | "\\wingtiptoys\","\\cohovineyard\","UNC" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GPOMigration 2 | PowerShell module and sample code for migrating group policies between domains or forests 3 | 4 | Find the blog posts describing this code here: [https://blogs.technet.microsoft.com/ashleymcglone/tag/gpo/](https://blogs.technet.microsoft.com/ashleymcglone/tag/gpo/) 5 | --------------------------------------------------------------------------------