Hello All
I have a registry key as follows
HKLMSYSTEMCurrentControlSetservicesTcpipParameters
which contains a Multi String value called
ReservedPorts
the value data for this Multi String value name is
1433-1434
1024-3343
i.e. two lines of text.
I am using the following code to output the above
$HKLM = 2147483650 #HKEY_LOCAL_MACHINE
$Server = "MyServer"
$reg = [wmiclass]"$Serverrootdefault:StdRegprov"
$key = "SYSTEMCurrentControlSetservicesTcpipParameters"
$value="ReservedPorts"
$ReservedPorts = $reg.GetMultiStringValue($HKLM,$key,$value)
$ReservedPorts.sValue
However it returns one of the two values i.e. the last value 1024-3343
Now I think I need to enumerate through a collection to get each value in turn? but cannot get the syntax right. Alternatively do I need to used another methods to get all the values of this multi string?
Thanks in advance
Ernie
WMI GetMultiStringValue question
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
WMI GetMultiStringValue question
Thanks Jim, your right
tried it on my home PC works as expected, tried it on works PC did not work as expected. Must be some thing weird going on at work.
Thanks again Jim, I am off to Pombal in Portugal in 4 weeks thank good
Ernie
tried it on my home PC works as expected, tried it on works PC did not work as expected. Must be some thing weird going on at work.
Thanks again Jim, I am off to Pombal in Portugal in 4 weeks thank good
Ernie
WMI GetMultiStringValue question
Ernie
If you can program teh scanner fo tabs all is much easier.
Stop bragging about going off to have fun in the badlands of Portugal. We will save some of the remaining winter for you. You can't get away.I think my cousin is somewhere around there or maybe he is still in the Azores. (I think it is warmer in the Azores then in Pombal)
If you can program teh scanner fo tabs all is much easier.
Stop bragging about going off to have fun in the badlands of Portugal. We will save some of the remaining winter for you. You can't get away.I think my cousin is somewhere around there or maybe he is still in the Azores. (I think it is warmer in the Azores then in Pombal)