Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

get-logonstatistics

Posted on 2011-02-15
5
Medium Priority
?
1,140 Views
Last Modified: 2012-05-11
I want to get a list of client versions for my users.  This is getting me close to all of the data that I want:  Get-LogonStatistics e144534| ft windows2000account, databasename, clientversion -autosize

But I would really like to include the company field.  I know it comes from the get-user command, but i cannot figure out how to combine.

Can anyone help?
0
Comment
Question by:suelizy
  • 2
5 Comments
 
LVL 27

Expert Comment

by:KenMcF
ID: 34901597
You can do something like this.
$users = get-user 
$users | %{Get-LogonStatistics -identity $_.samaccountname | Select `
windows2000account, databasename, clientversion,
@{n='Compnay';e={ (get-user $_.Windows2000Account).company }} }

Open in new window

0
 

Author Comment

by:suelizy
ID: 34907125
Thanks KenMcF.  When I run this the company field is blank in the results.  Do you have any ideas for that?



0
 
LVL 27

Accepted Solution

by:
KenMcF earned 2000 total points
ID: 34907153
Try this one, I have had problems trying to copy code in the past from here. Check for spaces at the end of the lines.


$users = get-user   
$users | %{Get-LogonStatistics -identity $_.samaccountname | Select `
windows2000account, databasename, clientversion,
@{n='Compnay';e={ (get-user $_.Windows2000Account).company }} }

Open in new window

0
 
LVL 74

Expert Comment

by:Glen Knight
ID: 35145688
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

WatchGuard Case Study: NCR

With business operations for thousands of customers largely depending on the internal systems they support, NCR can’t afford to waste time or money on security products that are anything less than exceptional. That’s why they chose WatchGuard.

Question has a verified solution.

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

With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

927 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