Solved

Powershell output into separate excel columns

Posted on 2014-11-10
3
1,827 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

Suggested Solutions

Utilizing an array to gracefully append to a list of EmailAddresses
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

730 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