I need to write a script that will remove all users under Local Computer Policy > Computer Configuration > Windows Settings > Security Settings > User Rights Assignment > Change the system time
from the local group policy (gpedit.msc) on all Windows XP machines. These machines are not on the domain. I DO have a way to distribute and run the script automatically. Can someone point me in the right direction for creating a script like this?
Well, ignoring the fact that an administrator can just change it back.. ;)
The secedit tool should provide the functionality you need. Use
/areas SECURITYPOLICY
.Late answer but may be useful. You also can try to do it using utility from Windows Server 2003 Resource Kit Tools ntrights.exe.
Example script (tested on Windows XP Professional SP3):