I am running a script to query AD. My output is like below. I want the results to display as in column and rows. Please assist
Name ADSPath lastLogonTimestamp
---- ------- ------------------
HAZ-DC LDAP://CN=HAZ-DC,OU=Domain Controllers,DC=haz,DC=local 2020-03-19 3:08...
$Result = "" | Select-Object Name,ADSPath,lastLogonTimestamp
$Result.Name = [String]$Account.Properties.name
$Result.ADSPath = [String]$Account.Properties.adspath
$Result.lastLogonTimestamp = [DateTime]::FromFileTime([Int64]::Parse($Account.Properties.lastlogontimestamp))
$Results = $Results + $Result
# Output the results
$Results | Out-File C:\test\PCLogon.CSV
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.