By the sound of it, you were using code like this:
(gwmi namespacegoeshere -ComputerName ‘test’).endtime | ForEach-Object { [System.Management.ManagementDateTimeConverter]::ToDateTime($_.endtime) }
You’re essentially trying to read the value of $object.endtime.endtime , in that code (which will always be null). One or the other of the instances of “.endtime” in the code would have to go; in this case, it doesn’t matter which one. In general, though, I would recommend keeping the one inside the loop (so you still have access to any other properties of the objects returned by Get-WmiObject):
gwmi namespacegoeshere -ComputerName ‘test’ | ForEach-Object { [System.Management.ManagementDateTimeConverter]::ToDateTime($_.endtime) }