I want to be able to isolate the date from the output of this Get-ADUser command:
Get-ADUser -identity johnd -properties LastLogonDate | Select-Object name, Last
Can you use variables? If so,
PS>$hi=Get-ADuser -identity johnd -properties LastLogonDate|select-object name,LastLogonDate PS>$hi.LastLogonDate.ToShortDateString() 3/21/2016 PS>$hi.name John Doe