Solved

Need a script of csvde command

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
A procedure for exporting installed hotfix details of remote computers using powershell
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
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…

785 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