I was recently tasked with adjusting the DCOM Security Settings (DCOM: Machine Access Restrictions and DCOM: Machine Launch Restrictions) in the local security policy on a number of computers. These can be changed manually by opening the Local Security Policy and browsing to Local Policies and then Security Options, but it needed to be more automated than that and needed to be rolled out to a few hundred Windows XP Computers.
The requirements of the script were as follows:
- Add two groups to each of the policy settings
- Do not try and add them again if they already exist
- Do not overwrite the users/groups that are already there
- Group Policy is not an option for this project
- Log Everything