This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Set-RegistryValueForAllUsers { | |
<# | |
.SYNOPSIS | |
This function uses Active Setup to create a "seeder" key which creates or modifies a user-based registry value | |
for all users on a computer. If the key path doesn't exist to the value, it will automatically create the key and add the value. | |
.EXAMPLE | |
PS> Set-RegistryValueForAllUsers -RegistryInstance @{'Name' = 'Setting'; 'Type' = 'String'; 'Value' = 'someval'; 'Path' = 'SOFTWARE\Microsoft\Windows\Something'} | |
This example would modify the string registry value 'Type' in the path 'SOFTWARE\Microsoft\Windows\Something' to 'someval' | |
for every user registry hive. |