Solved

Powershell output into separate excel columns

Posted on 2014-11-10
3
1,470 Views
Last Modified: 2016-11-06
Hi Guys, i have the following command and id like to have the output comma separated so that i can have the computername, last logon and time split in to different colums in excel. what would be the best way to acheive this

Get-ADComputer -Filter * -Properties *  | Sort LastLogonDate | FT Name, LastLogonDate

thanks
0
Comment
Question by:cwstad2
3 Comments
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 500 total points
ID: 40433740
Here you go.

Get-ADComputer -Filter * -Properties LastLogonDate  | Select Name,LastLogonDate | Sort LastLogonDate | Export-CSV C:\Computers.csv -nti

Open in new window

0
 
LVL 15

Author Comment

by:cwstad2
ID: 40447583
excellent thanks
0
 

Expert Comment

by:anish kanna
ID: 41876539
Thank you so much... works great... thnx a lot
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Synchronize a new Active Directory domain with an existing Office 365 tenant
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now