Solved

Need a script of csvde command

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

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 28

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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…

758 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

16 Experts available now in Live!

Get 1:1 Help Now