Solved

Need a script of csvde command

Posted on 2014-01-24
4
123 Views
Last Modified: 2014-12-24
Need a script or csvde command to export list of users that are enabled in domain but have not logged on the the domain in x number of days
0
Comment
Question by:SyFy
  • 2
  • 2
4 Comments
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 39807081
Try if this works:
import-module ac*
Get-ADUser -Filter 'enabled -eq $true' | Format-Table -Property name, LastLogonDate

Open in new window


If not I can probably tweak it a bit to get exactly what you need.
0
 
LVL 11

Expert Comment

by:Venugopal N
ID: 39807105
You can use the dsquery to get the list of stale users account.

http://technet.microsoft.com/en-us/library/cc725702.aspx
0
 
LVL 11

Expert Comment

by:Venugopal N
ID: 39807113
dsquery user -o rdn/samid  -inactive 26 -limit 0
0
 
LVL 29

Expert Comment

by:becraig
ID: 39807971
Replace 240 below with the number of days you want to check for

import-module ac*
Search-ADAccount -AccountInactive -TimeSpan ([timespan]240d) -UsersOnly
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

808 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