Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: Comparing objects - and VMproperty value as a result.

$
0
0

Hi LucD,

 

I am getting an error as follows

 

 

C:\> $lookupTab = @{}

C:\> Get-Content c:\list.txt | %{

>>   $key,$value = $_.Split(':')

>>   $lookupTab.Add($key,$value)

>> }

>>

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'storage1'  Key being added: 'storage1'"

At line:3 char:17

+   $lookupTab.Add <<<< ($key,$value)

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : DotNetMethodException

 

 

Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'storage1'  Key being added: 'storage1'"

At line:3 char:17

+   $lookupTab.Add <<<< ($key,$value)

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : DotNetMethodException


Viewing all articles
Browse latest Browse all 219257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>