I am gathering a list of all computers on my domain and trying to display some specific properties in a formatted table. This is the command I'm using:
Get-ADComputer `
-Filter "objectclass -eq 'computer'" `
-SearchBase "DC=JHanDomain,DC=local" `
-Properties info | FT Name,Enabled,whenCreated,whenChanged,DistinguishedName -A
The code runs without error and displays a nicely formatted table, but the data in the 'whenCreated' and 'whenChanged' columns are missing.
It shows up fine when I just do -Properties whenChanged,whenCreated
but not when I try to format it into a table. Any idea why this might be?
Whichever additional properties you need to display outside of default ones, need to be added to the
-Properties
list, so in your casewhenCreated,whenChanged
, I removed info, since you were not displaying it. You could also use*
instead if you still choosing all the propertiesFrom Get-ADComputer help: