i work with hyperv virtual machine and powershell and find really weird problem
when i get the type of an object and then check for it (ex: String):
PS > "str".gettype().fullname
System.String
PS > "str".gettype() -eq [System.String]
True
but when i get the type of a vm object:
PS > (get-vm)[0].gettype().fullname
Microsoft.HyperV.PowerShell.VirtualMachine
and then i check the vm type:
PS >(get-vm)[0].GetType() -eq [Microsoft.HyperV.PowerShell.VirtualMachine]
False
does someone understand this weird comportement of powershell object type ??
there is difference between .net and PSObject ?
tks,