Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, January 8, 2013 2:23 PM
Hello,
I am attempting to create a new registry itemProperty with a type = REG_MULTI_SZ. I can't find the correct switch settings to complete this? I have to beleive this is something simple.
Set-ItemProperty -Path HKLM:\Software\Microsoft\RPC\Internet -type multistring -Name "Ports" -Value "10005-12000"
Ideas?
TIA
Paul
All replies (5)
Tuesday, January 8, 2013 2:38 PM ✅Answered
What is the problem?
Your command works for me with a different path :)
Tuesday, January 8, 2013 2:45 PM ✅Answered
Ok, Problem is the PowerGUI Script Editor. I went native and it worked. :-(
Thx
Paul
Tuesday, January 8, 2013 2:37 PM
New-ItemProperty HKLM:\Software\Microsoft\RPC\Internet -Name Ports -Value '5000-5015' -PropertyType MultiString -Force
Tuesday, January 8, 2013 2:42 PM
Set-ItemProperty : A parameter cannot be found that matches parameter name 'Propertytype'.
At X:\Batch\Powershell\DomainControllers\PortLockDown.ps1:15 char:78
+ Set-ItemProperty -Path HKLM:\Software\Microsoft\RPC\Internet -Propertytype <<<< multistring -Name "Ports" -Value "10005-12000"
+ CategoryInfo : InvalidArgument: (:) [Set-ItemProperty], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SetItemPropertyCommand
Paul
Friday, April 14, 2017 4:59 PM
HI All
hoping someone can help..
New-ItemProperty HKLM:\Software\Microsoft\RPC\Internet -Name Ports -Value '5000-5015' -PropertyType MultiString -Force
Let's say i have created the above MultiSting Key with the values from above. Where i'm strugling with for the past 2 days is how do i add another value to the same string without overwritting what was there originally. Every permutation of PS script i have tried has failed in the sense that it deletes everything that was previously in that string.
Is there a way to just append a new value...?
thanks in advanced!