Use multiple Select-Object Expressions

ForEach-Object {Get-ADUser -Filter “EmployeeID -eq ‘$($_.EID)’” -Properties Displayname, LastLogon, LastLogonDate, LastLogonTimeStamp, EmployeeID } |
Select-Object DisplayName, SamAccountName, Enabled, LastLogon, LastLogonDate,

@{Name=“LastLogonTimeStamp”; Expression={[DateTime]::FromFileTime($.lastLogonTimestamp)}
@{Name=“LastLogon”; Expression={[DateTime]::FromFileTime($
.lastLogon) }

How do I use two select-object expressions?

P l e a s e format your code as code. I know you know how to do because you already did in the past. :wink:

If your question is how you use 2 or more calculated properties - you simply use them like any other property - you separate them with commas!? :man_shrugging:t4:

You should ALWAYS read the help for the cmdlets you’re about to use completely including the examples to learn how to use them.

Pay attention to the example 11

… and you can use them for more than just Select-Object

Viola! Example 11 did it. You have no idea how your feedback forces me to learn and get better at this. Thank you.