Solved

get status of user(enable or disable) in AD with command

Posted on 2013-12-04
3
414 Views
Last Modified: 2014-01-14
I received a request for around 30-40 users to provide information for them if their accounts are disabled or not in AD.
It's very time consuming to go to each account in AD, open account tab, scroll down to see if the checkbox is applied and to take a screenshot.
Is there any other way,with command to get this information for list of users. I am having the list of users in txt file.
And the most important I cannot copy/paste info - I need to provide a screenshot , so it will be useful if the command retrieve info probably like
user - enabled
user2- disabled
user3 -disabled

AD domain is Windows 2003R2
0
Comment
Question by:dedri
3 Comments
 
LVL 19

Assisted Solution

by:jss1199
jss1199 earned 167 total points
ID: 39695591
dedri - Personally, I am fond of Powershell so I would suggest you use the below script, modified to your specifications.

Get-Content -Path C:\AccountsListing.txt |
ForEach-Object {
    Get-ADUser -LDAPFilter "(samaccountname=$_)" |
    Select-Object -Property samaccountname,enabled
}

Open in new window


Since you are a 2003 domain, you'll need to ensure you are setup in a similar fashion as this to enable powershell cmdlets against your 2003 domain.

jss
0
 
LVL 35

Assisted Solution

by:Mahesh
Mahesh earned 166 total points
ID: 39695608
What you can do, just open AD users and computers snap ins and right click domain name and click on find
In find box select Common queries and select checkbox against "Disabled users"
so that it will give you the list of disabled users
Just export the list.
All users except above are enabled users

Or you can download "Bulk AD Users" tool from Wise soft (Freeware) and search user there from list, it will give you the status of all users, just export them and filter with "Disabled or Enabled
http://wisesoft.co.uk/software/bulkadusers/default.aspx

Mahesh
0
 
LVL 3

Accepted Solution

by:
Detlef001 earned 167 total points
ID: 39699007
You can get but by specific areas like in you can get it by user who by date the enable and disable status.

Have a look at this link for the same.

http://gallery.technet.microsoft.com/scriptcenter/Script-to-disable-or-re-4e7bda2f

http://gallery.technet.microsoft.com/scriptcenter/PowerShell-to-Disable-c55a8862

http://blogs.technet.com/b/heyscriptingguy/archive/2010/11/22/use-powershell-to-enable-or-disable-a-local-user-account.aspx

Hope it helps you to achieve your task.

Thanks.
0

Featured Post

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

708 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

12 Experts available now in Live!

Get 1:1 Help Now