how can i update HKCU with powershell script

hello, can someone provide a powershell script that we can use to modify a registry value [bulk] in the HKCU section of the registry?

thx in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_beeDirector of Information TechnologyCommented:
How are you going to apply this script?  Depending on the way you might be able to leverage Group Policy.
siber1Author Commented:
we are flexible and open to options. thx
yo_beeDirector of Information TechnologyCommented:
If you plan on running your script on a manual per user basis or logon script. I would recommend using Group Policy Preferences. You will find it very intuitive and not need to know scripting and get the same results.

I recommend searching the Internet on how to regarding this. If you run into a wall I will see if I can assist tomorrow.

I am currently on my phone so I am limited at posting instructions and examples.

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

siber1Author Commented:
I'm going to repost this question and would appreciate it if you don't respond to my new question. I am very familiar with GPO's this question was specific to custom powershell scripting.
siber1Author Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for siber1's comment #a40875530

for the following reason:

Reposting will not help because your query deals with HKCU which means it must run by the logged in user to make changes to their own setting, you can not do it in bulk.
The direct answer to your question in the way you framed is no, you can not.

If you are looking at a script going through user profile folder on them server loading ntuser.dat and making the change it is a different story.

Your comment to the offered solution by an alternate approach is a rather objectionable and disrespectful to yo_bee.

You should include what the change it is you want to add.
yo_beeDirector of Information TechnologyCommented:
@siber.  I am open to helping you and I felt that if you gave some more detail about what you were looking to accomplish we probably could of came up with something.   Sorry I was not able to help.

Good Luck on your task.

Netminder said to repost over here, since the question I originally answered is going to be deleted....

The hard part of the question, I take it, is how to modify the HKCU for other users - is that why you included the "[bulk]" modifier?

You would do this in the HKU section of the registry instead. There's some jiggery-pokery needed if you want to be selective about which users you want to apply the modifications to - the registry keys under HKU are SIDs, but with some additional effort you can figure out the user's profile path or user's name.

I found Geo's explanation of how to relate username to SID helpful at where he shows how to look at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

to build the mapping between SID and username - well, really the user's profile path, which typically includes the user name - but as an alternative you could use Powershell's Active Directory interfaces to do this.

Are you looking for a motivated expert willing to write the script for you or are you just seeking some advice on the general approach?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.