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
Solved

Powershell output into separate excel columns

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This script checks a path to see if a folder exists. If the folder does exist you will get output "The folder has previously been created. No action taken" If not it will create the folder. Then adds one user modify permission to the folder. It …
In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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