PS ewu\My Documents\GitHub\PowerShell> get-aduser ewu -Properties LastLogonDate | Select LastLogonDate
LastLogonDate
————-
1/1/2016 6:22:01 PM
PS ewu\My Documents\GitHub\PowerShell> get-aduser ewu -Properties LastLogonDate | Select LastLogonDate | gm
TypeName: Selected.Microsoft.ActiveDirectory.Management.ADUser
======
PS ewu\My Documents\GitHub\PowerShell> (get-aduser ewu -Properties LastLogonDate | Select LastLogonDate).LastLogonDate
Friday, January 01, 2016 6:22:01 PM
PS ewu\My Documents\GitHub\PowerShell> (get-aduser ewu -Properties LastLogonDate | Select LastLogonDate).LastLogonDate | gm
TypeName: System.DateTime
=========
PS ewu> (get-aduser ewu -Properties LastLogonDate | Select LastLogonDate).LastLogonDate
Friday, January 01, 2016 6:22:01 PM
PS ewu> ((get-aduser ewu -Properties LastLogonDate | Select LastLogonDate).LastLogonDate | Out-String) -like “*Jan*2016*”
True
PS ewu> (get-aduser ewu -Properties LastLogonDate | Select LastLogonDate | out-string)
LastLogonDate
————-
1/1/2016 6:22:01 PM
PS ewu> (get-aduser ewu -Properties LastLogonDate | Select LastLogonDate | out-string) -like “*1*2016”
False