I have the following snippet of PowerShell:
$property = @{
Getter = { 80 };
}
$value = $property.Getter.Invoke()
$value.GetType() # Shows Name = Collection'1 instead of int
I would expect $value.GetType() to return Int32 but instead it returns a collection.
I can't just take element [0] because sometimes the Getter function will return an array.
How can I fix this?