Solved

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

Posted on 2013-12-04
3
418 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

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 …
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…

920 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