Solved

Need a script or Windows command

Posted on 2012-04-04
3
290 Views
Last Modified: 2012-05-17
I have a list of domain users. I want a script  to check whether those accounts are enabled or disabled  user accounts in the active directory.
Also is there any commands in Windows to check the status of an user account is enabled or disabled in domain

Thanks
0
Comment
Question by:jmohan0302
  • 2
3 Comments
 
LVL 59

Accepted Solution

by:
Darius Ghassem earned 167 total points
ID: 37807649
You can use this script that will give you all disabled accounts which you can compare too.

http://gallery.technet.microsoft.com/scriptcenter/02cc08c2-1cf3-4eb1-a8d0-e838d74f7783
0
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 333 total points
ID: 37807661
command - net user /domain username


Set objUser = GetObject _
("LDAP://CN=Impersonation User,CN=Users,DC=subdomain,DC=domain,DC=com")

If objUser.IsAccountLocked = FALSE Then
WScript.Echo "The account is enabled."
Else
WScript.Echo "The account is disabled."
End If
0
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 333 total points
ID: 37807674
so if your username is test123 on domain.. you can run the below command from any domain machine to query

net user /domain test123
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

Update 11/3/2014 - Although the below article will get you to relocate the WINSXS folder, Microsoft has finally released a utility to reduce the size of the WINSXS folder. For some reason, it's not that straightforward. It only works on Windows 2008…
Several part series to implement Internet Explorer 11 Enterprise Mode
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…

707 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

13 Experts available now in Live!

Get 1:1 Help Now