Hi,
I'd be happy to help you out with your question. Sorry for the inconvenience caused.
As you require some PowerShell scripts for the migration.
When servers are added to a new domain, the domain controller automatically assigns new SIDs for each server as well as groups and users. PowerShell scripts can be used to move computers between domains, and Active Directory can be used to move users from one domain to another. Additionally, PowerShell scripts can be used when migrating file servers in a domain migration. For SharePoint migrations, Move-SPUser cmdlet can be used to migrate users programmatically
- Export AD users from ABC Domain and import the same in XYZ Domain :- To export and import Active Directory users from one domain to another, PowerShell scripts can be used. For example, when configuring a hybrid environment, Office 365 accounts can be merged with on-premises Active Directory accounts.
- Export AD Groups and their "member of" from ABC Domain and import the same in XYZ Domain :- PowerShell scripts can be used to export AD groups and their "member of" from ABC domain and import the same in XYZ domain. Active Directory can be used to create groups like support and make template accounts a member of them. PowerShell commands can also be used to manage group membership in Active Directory.
- Export all ABC Domain file servers shared drive permissions backup and when I move it to new Domain ( XYZ), I will apply the same permissions/ access rights on each and every folder :- PowerShell scripts can be used to export folder permissions to a CSV file, and to manage folder permissions. When establishing a new domain controller and joining a file server to it, shared folder permissions can be exported and imported.
Please refer to following documentation, it will help you get desired PowerShell Scripts :-
ServerMigration Module | Microsoft Learn :- https://learn.microsoft.com/powershell/module/servermigration/
Active Directory - Microsoft Q&A :- https://learn.microsoft.com/answers/tags/251/active-directory?filterby=withacceptedanswer&orderby=answercount&page=57
How to import and export ad users or ou :- https://learn.microsoft.com/answers/questions/281190/how-to-import-and-export-ad-users-or-ou-from-one-d.html
Exporting and importing shared folder permissions :- https://social.technet.microsoft.com/Forums/exchange/8fa603a8-026c-43d3-ae73-543bad3a57ce/exporting-and-importing-shared-folder-permissions-in-2-different-domains?forum=ITCG
If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.