I actually just want all the users properties.. only through vbscript.. at a
commandprompt I would type the followingto get the information I am looking
for.. so is there another way besides reading and parsing this information?
(That's what I am about to do Alex/if your reading...with your cmdshell
function...)
c:\>net user myuserid /domain
--------- From the SysAdminScriptingGuide 1.1 --------------
Const MIN_IN_DAY = 1440, SEC_IN_MIN = 60
Set objDomain = GetObject("WinNT://fabrikam")
Set objAdS = GetObject("LDAP://dc=fabrikam,dc=com")
intMaxPwdAgeSeconds = objDomain.Get("MaxPasswordAge")
intMinPwdAgeSeconds = objDomain.Get("MinPasswordAge")
intLockOutObservationWindowSeconds =
objDomain.Get("LockoutObservationInterval")
intLockoutDurationSeconds = objDomain.Get("AutoUnlockInterval")
intMinPwdLength = objAds.Get("minPwdLength")
intPwdHistoryLength = objAds.Get("pwdHistoryLength")
intPwdProperties = objAds.Get("pwdProperties")
intLockoutThreshold = objAds.Get("lockoutThreshold")
intMaxPwdAgeDays = _
((intMaxPwdAgeSeconds/SEC_IN_MIN)/MIN_IN_DAY) & " days"
intMinPwdAgeDays = _
((intMinPwdAgeSeconds/SEC_IN_MIN)/MIN_IN_DAY) & " days"
intLockOutObservationWindowMinutes = _
(intLockOutObservationWindowSeconds/SEC_IN_MIN) & " minutes"
If intLockoutDurationSeconds <> -1 Then
intLockoutDurationMinutes = _
(intLockOutDurationSeconds/SEC_IN_MIN) & " minutes"
Else
intLockoutDurationMinutes = _
"Administrator must manually unlock locked accounts"
End If
WScript.echo "maxPwdAge = " & intMaxPwdAgeDays
WScript.echo "minPwdAge = " & intMinPwdAgeDays
WScript.echo "minPwdLength = " & intMinPwdLength
WScript.echo "pwdHistoryLength = " & intPwdHistoryLength
WScript.echo "pwdProperties = " & intPwdProperties
WScript.echo "lockOutThreshold = " & intLockoutThreshold
WScript.echo "lockOutObservationWindow = " &
intLockOutObservationWindowMinutes
WScript.echo "lockOutDuration = " & intLockoutDurationMinutes
the AD functions were written for this purpose - since it is such a pain to get
the info from script.
Two possibilities come to mind besides just parsing the net user output:
(1) Install the NT ADSI extensions on a DC so you CAN use a script to get the
info.
(2) Write or acquire a custom component to do it. The APIs are fairly simple.
This is probably not realistic at this point for you, so I would lean towards
#1.
In news:UzKdnRZHxZX...@comcast.com,
Anthony typed:
--
Please respond in the newsgroup so everyone may benefit.
http://dev.remotenetworktechnology.com
----------
Subscribe to Microsoft's Security Bulletins:
http://www.microsoft.com/technet/security/bulletin/notify.asp
> the AD functions were written for this purpose - since it is such a pain to get
> the info from script.
>
> Two possibilities come to mind besides just parsing the net user output:
>
> (1) Install the NT ADSI extensions on a DC so you CAN use a script to get the
> info.
Shouldn't it be sufficient to install the ADSI extensions only on the computer
running the script, DC or not?
--
torgeir
Microsoft MVP Scripting and WMI
Porsgrunn Norway
Thank you for your help.
--
Anthony B
------------------------
O'Toole's Commentary: Murphy was an optimist.
"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3DC43E9F...@hydro.com...
In news:3DC43E9F...@hydro.com,
Torgeir Bakken (MVP) typed:
> "Alex K. Angelopoulos (MVP)" wrote:
>
>> the AD functions were written for this purpose - since it is such a
>> pain to get the info from script.
>>
>> Two possibilities come to mind besides just parsing the net user
>> output:
>>
>> (1) Install the NT ADSI extensions on a DC so you CAN use a script
>> to get the info.
>
> Shouldn't it be sufficient to install the ADSI extensions only on the
> computer running the script, DC or not?
--