Powershell – updating drive mapping GPO programmatically using powershell

group-policypowershell

I have a Group Policy in a domain that have lots of drive mapping settings.
I would like to change the path for a lot of these servers in this gpo with powershell if possible. I know i could do this via the GPMC, but would prefer to do it programtically.
I have looked at the grouppolicy powershell module from microsoft (get-gpo and friends) but i only seem to be able to change registry entrys and permissions on the policys, not the actual path for the drivemapping. any ideas?
Thanks!

Best Answer

To change GPOs you've got to use the Set-GPPrefRegistryValue for preferences or Set-GPRegistryValue for other values. All a GPO does is set registry values so the paths are actually just registry values.