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
siber1Asked:
Who is Participating?
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.
0
siber1Author Commented:
we are flexible and open to options. thx
0
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.

Mike
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

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.
0
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
0
arnoldCommented:
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.
0
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.

Mike
0
jmcgOwnerCommented:
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
http://www.georgealmeida.com/2014/09/how-to-edit-hkey_current_user-for-another-user/ 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?
0

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
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.