http://vcloud-lab.com/entries/powershell/microsoft-powershell-remotely-write-edit-modify-new-registry-key-and-data-valueComments on post: Microsoft Powershell: remotely write, edit, modify new registry key and data valueVivitiCMS2023-03-16T17:38:20+05:30Virtual Geektag:vcloud-lab.com,2020-09-02:/entries/108133#comment_158565Comment by N/A2020-09-02T20:55:34+05:302020-09-02T20:55:34+05:30This was very helpful. Thank you.tag:vcloud-lab.com,2021-03-24:/entries/108133#comment_159332Comment by Anonymous2021-03-24T00:31:56+05:302021-03-24T00:31:56+05:30Question, when attempting to use this with a registry path Control Panel\TimeDate under the CurrentUser hive it fails because of the space between the words Control and Panel. I tried using single or double quotes and it doesn't work. Any thoughts?tag:vcloud-lab.com,2021-10-15:/entries/108133#comment_161530Comment by Stefan Geerts2021-10-15T18:32:06+05:302021-10-15T18:32:06+05:30Hello,
Is this also possible for adapting registry for the current logged on user?
I tried with RegistryHive HKU, but it seems that this is not allowed/ not working. Appreciated to have this also being possible.
Many thanks,
regards,
tag:vcloud-lab.com,2021-10-22:/entries/108133#comment_161599Comment by Doug Wood2021-10-22T18:50:31+05:302021-10-22T18:50:31+05:30I was unable to get the multistring value working properly.
"The type of the value object did not match the specified RegistryValueKind or the object could not be properly converted."
How should I specify the value when working with a multistring? Thankstag:vcloud-lab.com,2021-10-22:/entries/108133#comment_161601Comment by Janvi2021-10-22T21:46:01+05:302021-10-22T21:46:01+05:30Please send me exact screenshot of what your are trying to do and error on janviudapi@gmail.com.tag:vcloud-lab.com,2021-10-22:/entries/108133#comment_161602Comment by janvi2021-10-22T21:46:34+05:302021-10-22T21:46:34+05:30use foreach loop.tag:vcloud-lab.com,2021-10-22:/entries/108133#comment_161603Comment by janvi2021-10-22T21:47:52+05:302021-10-22T21:47:52+05:30you can use 'Users' as hive for HKU.tag:vcloud-lab.com,2023-03-16:/entries/108133#comment_167598Comment by None2023-03-16T17:38:20+05:302023-03-16T17:38:20+05:30Hi, is there a way to add credentials to the command?
For example when the logged in user has no rights to modify the registry on the remote-computer?
my command looks like this atm:
Write-RegistryValue -ComputerName $Servername -RegistryHive LocalMachine -RegistryKeyPath "SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Shutdown\0\0" -ValueName 'Parameters' -ValueData force -ValueType String
The script runs with systemrights, wich has no permissions to modify registry remotly, so i would like to add credentials.