Some users are experiencing problems with their OneDrive therefore we need to change the D word in Regedit to 0.
Set-ItemProperty -Path "HKEY:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Type DWord -Name "DisableFileSyncNGSC" -value 0
For HKEY_LOCAL_MACHINE you can only change it by running the regedit as admin.
I would like to have this scripted so it runs from my admin account, my admin credentials should be stored somewhere and when the user open/run the file on my public folder the regkey has been changed.
Is this possible?