Solved

Powershell output into separate excel columns

Posted on 2014-11-10
3
1,646 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
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 …

777 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