Solved

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

Posted on 2013-12-04
3
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 37

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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

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

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
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…

734 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