I’m using C# and powershell to connect to microsoft online exchange services and gather the password expire date of my users.
Results I get after invoking powershell cmdlet Get-MSOnlineUser from C# (stored inside PSObject.Object or PSObject.ImmediateObject as a big string):
\n\rIdentity: test@test.com \n\r FirstName: TestFirstName \n\r LastName: TestLastName \n\r...etc.
I tried going through PSObject.Members or PSObject.Properties but no deal
My question would be – is there a way to deserialize those properties into one of PSObjects within powershell framework in .NET?
I think since all happens in the other side (microsoft exchange online side) so the remote won’t send the complete hierarchy of classes so I cannot go down PSObject hierarchy…but not sure.
NOTE: I’m calling this command in migration console powershell but through C#:
> Get-MSOnlineUser -Identity test@test.com -Credential Get-Credential
After a while microsoft team enabled the “password never expire” option. I don’t need this anymore =)