#62141 - 2002-03-11 02:51 PM
Re: Script for determining NT account expiry?
|
attiahia
Hey THIS is FUN
Registered: 2000-03-27
Posts: 268
|
NTDOC
thanks a lot for your hlp. The value of the mentioned key in my workstation is 5,0,00,0 which mean Windows 2000/DSClient.
LLigetfa
Your idea is excellent and this what I already start to do but before I continue I like to say the following.
This code
$usr = GetObject("WinNT://"+@LDOMAIN+"/"+@UserID+",user") $AccountExpirationDate = $usr.AccountExpirationDate ? @UserID+" - AccountExpirationDate = "+$AccountExpirationDate
Is exactly what I want and it gave me the expiration date but the question is:
When I tested the code locally (C:\Kix32 Script.Kix) on one of our user BC it did not work because the BC does not have ADSI. Now, in the real situation when I place this script on the domain controller where ADSI is installed, will the script work fine?
I mean is there a way to run this part of the script on the domain controller?
Or this code require ADSI to be installed on the user BC it self?
Thanks a lot For this great help. ![[Smile]](images/icons/smile.gif) [ 11 March 2002, 14:53: Message edited by: attiahia ]
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1821 anonymous users online.
|
|
|