Hello P Mowleeswaran,
Thank you for posting in Q&A forum.
I am sorry we don’t directly write script for use on the forum, and I am not familiar with script.
I think you could use the Get-GPO, Get-GPRegistryValue, and Set-GPRegistryValue cmdlets to achieve it.
For example:
Get-GPO -Name "YourGPOName"
Get-GPRegistryValue -Name "YourGPOName" -Key “registryPath” -ValueName ”ruleName”
References:
Get-GPO (GroupPolicy) | Microsoft Learn
Get-GPRegistryValue (GroupPolicy) | Microsoft Learn
Set-GPRegistryValue (GroupPolicy) | Microsoft Learn
I hope the information above is helpful.
If you have any questions or concerns, please feel free to let us know.
Best Regards,
Daisy Zhou
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.