I am using the following script to export GPOs from the production environment and import them into the test lab environment.
My test lab forest and domains are different from production environment:
Production environment domain name: corp.condoso.com
Test lab domain name: corpqa.condoso.com (only two letters difference)
I tested this script in the lab by importing and exporting GPOs to the same domain name and GPOs were successfully recreated and linked!! But when I did export of the production domain which is different name, I was not successful in linking GPOs. I am getting this error with link path to the production domain. Of course the name as I mentioned is different from the lab and I think that's why it is failing.
Error: gPLink path does not exist .....path
Could you please advise on the easiest approach to get all those links pathes updated. Maybe a switch in the script to automatically translate from corp.domain.com to corpqa.domain.com? Or how to export the MigTable with the switch and then do a replace for all domains?? That script didn't export the MigTable. I have a sample MigTable but don't know what to do with it. I also tried two other Microsoft scripts but could not make them work at all - as I am beginner with powershell. The script that I posted here was the only script I could make it work.
Thank you so much!