Here we go check these out:

 

'-------------------------------------------------------------------------------
' Usr_CheckAccountDisabled.vbs
'
' Developer: Charles
' Developed: 2000-08-23
' Modified: 2000-08-23
' Version: 1.0
'
' Description: Checks if the user account is disabled
'-------------------------------------------------------------------------------

'-------------------------------------------------------------------------------
' *** Definitions ***
'-------------------------------------------------------------------------------
dim acctdisabled
dim dom
dim usr
dim UsrObj

'-------------------------------------------------------------------------------
' *** Main Script ***
'-------------------------------------------------------------------------------
' Request the username
do
   usr = inputbox("Please enter the user account name.", "Input")
loop until usr <> ""

' Request the domain name for this user
do
   dom = inputbox("Please enter the domain for this account.", "Input")
loop until dom <> ""

' Build the ADSI query and retrieve the user object
Set UsrObj = GetObject("WinNT://" & dom & "/" & usr & ",user")

' Retrieve the AccountDisabled information
acctdisabled = UsrObj.AccountDisabled

' Test if the account is diabled
if acctdisabled = FALSE then
   wscript.echo "The user account is not disabled."
else
   wscript.echo "The user account is disabled."
end if

'-------------------------------------------------------------------------------
' *** End
Main ***
'-------------------------------------------------------------------------------

 

 

This is the property you want  : acctdisabled = UsrObj.AccountDisabled (which is a Boolean value as you can see in the code above)

 

Regards,

Carlos Magalhaes

ADSI and DirectoryServices advice : http://groups.yahoo.com/group/ADSIANDDirectoryServices

WMI programming advice : http://groups.yahoo.com/group/WMIPROGRAMMING

 

-----Original Message-----
From: Mayet, Yusuf Y [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 1:33 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Account Unlocking Property

 

I am trying to delegate the permission of "Account Unlock" to a related group.

I can under the ACL find "Reset Password" and all the other finer stuff.

 

But can't seem to find the one mentioned above.

I have used ADSI Edit to locate "lockoutDuration" but also not sure what I should enter for the attribute value.

Also where do I make this change on the Domain Class?

 

Can anyone please help?

 

Thanks in advance.

Yusuf

 

______________________________________________

Disclaimer and confidentiality note

Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank.

The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way.

Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.

             _______________________________________________

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected.  Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.  

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination.  The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message.  Trencor is not
responsible in the event of any third party
interception of this email.   

If you have received this email in error please notify
[EMAIL PROTECTED]   For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply via email to