I need to store in Item of hashtable 2 int variables. But cannot undestand how to store it:
$hash = @{}
if($hash.contains($name) -eq $False){
$value = 1
$arr = @($my_var;$value)
$hash.add($name,$arr)
}else{
$value = $hash.item($name)
$value[1]++ #PROBLEM HERE
$hash.item($name)[0] = $my_var
$hash.item($name)[1] = $value
}
Problem is that $value[1] not exists(Note1), $value[0] contains also $my_var and $value with space.
Note1 - The '++' operator works only on numbers. The operand is a 'System.Object[]'.