Take the simple HashTable:
$data = @{
First = \'Justin\';
Last = \'Dearing\';
StartDate = Get-Date \'2002-03-23\';
}
The key St
Every object in powershell is actually wrapped mostly transparently in a psobject. I say mostly transparently because there are more than a few bugs in powershell that omit to remove the wrapper before leaking the object to another API. This causes all sorts of issues, much like the one you see now. Search connect.microsoft.com/powershell for psobject wrapper. I believe this is no longer an issue in v3 with the new DLR based engine.
Base on the msdn:
PSOobject Class : Encapsulates a base object of type Object or type PSCustomObject to allow for a consistent view of any object within the Windows PowerShell environment.
( get-Date '2002-03-23' ) -IS [psobject]
True
( get-Date '2002-03-23' ) -IS [datetime]
True
[datetime]( get-Date '2002-03-23' ) -IS [datetime]
True
[datetime]( get-Date '2002-03-23' ) -IS [psobject]
False