Solved

Need a script of csvde command

Posted on 2014-01-24
4
111 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ost file to pst 10 105
DNS Scavenging configuration 5 62
SBS 2008 cannot logon remotely 7 47
romain user profiles for windows users 22 59
Redirected folders in a windows domain can be quite useful for a number of reasons, one of them being that with redirected application data, you can give users more seamless experience when logging into different workstations.  For example, if a use…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
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…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

911 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now