Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - pwdLastSet chnge value

Reply
 
Old 11-25-2008   #1 (permalink)
Pietro84


 
 

pwdLastSet chnge value

i have try to change tshi attribute whit script...but dont work. the
script dont return an error but the attribute dont change...why?

My System SpecsSystem Spec
Old 11-25-2008   #2 (permalink)
Richard Mueller [MVP]


 
 

Re: pwdLastSet chnge value


"Pietro84" <mistake84@xxxxxx> wrote in message
news:58aa6f94-278f-4d83-bf78-3dd93178c5b5@xxxxxx
Quote:

>i have try to change tshi attribute whit script...but dont work. the
> script dont return an error but the attribute dont change...why?
The only values that can be assigned to this attribute are 0 and -1.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 11-27-2008   #3 (permalink)
Pietro84


 
 

Re: pwdLastSet chnge value

On 25 Nov, 14:11, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxx> wrote:
Quote:

> "Pietro84" <mistak...@xxxxxx> wrote in message
>
> news:58aa6f94-278f-4d83-bf78-3dd93178c5b5@xxxxxx
>
Quote:

> >i have try to change tshi attribute whit script...but dont work. the
> > script dont return an error but the attribute dont change...why?
>
> The only values that can be assigned to this attribute are 0 and -1.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
i try this

' Bind to Active Directory Domain
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("DefaultNamingContext")

Set objOU =GetObject("LDAP://CN=prova,OU=Segretariato
Generale,OU=Utenti Dominio,DC=ministero,DC=comunicazioni,DC=priv")
objOU.Put "pwdLastSet", -1
objOU.SetInfo


but dont work...0 yes...but -1 no
My System SpecsSystem Spec
Old 11-27-2008   #4 (permalink)
Richard Mueller [MVP]


 
 

Re: pwdLastSet chnge value


"Pietro84" <mistake84@xxxxxx> wrote in message
news:1c7d7440-391c-4aac-933c-3a472cb77543@xxxxxx
Quote:

> On 25 Nov, 14:11, "Richard Mueller [MVP]" <rlmueller-
> nos...@xxxxxx> wrote:
Quote:

>> "Pietro84" <mistak...@xxxxxx> wrote in message
>>
>> news:58aa6f94-278f-4d83-bf78-3dd93178c5b5@xxxxxx
>>
Quote:

>> >i have try to change tshi attribute whit script...but dont work. the
>> > script dont return an error but the attribute dont change...why?
>>
>> The only values that can be assigned to this attribute are 0 and -1.
>>
>> --
>> Richard Mueller
>> MVP Directory Services
>> Hilltop Lab -http://www.rlmueller.net
>> --
>
> i try this
>
> ' Bind to Active Directory Domain
> Set objRootDSE = GetObject("LDAP://RootDSE")
> strDNSDomain = objRootDSE.Get("DefaultNamingContext")
>
> Set objOU =GetObject("LDAP://CN=prova,OU=Segretariato
> Generale,OU=Utenti Dominio,DC=ministero,DC=comunicazioni,DC=priv")
> objOU.Put "pwdLastSet", -1
> objOU.SetInfo
>
>
> but dont work...0 yes...but -1 no
If the previous value of pwdLastSet is 0, assigning the value -1 results in
Active Directory actually making the value equivalent to the current
date/time (as if the user just changed their password). If the previous
value of pwdLastSet is any other value (even if the password is expired),
assigning the value -1 results in no change. If you want the value of
pwdLastSet to be equivalent to the current time, first assign 0, then
assign -1.

I don't find this documented, it's based on my experience. It is possible
the behavior depends on the version of AD. Assigning any other values
besides 0 or -1 should raise an error.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 11-28-2008   #5 (permalink)
Pietro84


 
 

Re: pwdLastSet chnge value

On 27 Nov, 15:23, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxx> wrote:
Quote:

> "Pietro84" <mistak...@xxxxxx> wrote in message
>
> news:1c7d7440-391c-4aac-933c-3a472cb77543@xxxxxx
>
>
>
Quote:

> > On 25 Nov, 14:11, "Richard Mueller [MVP]" <rlmueller-
> > nos...@xxxxxx> wrote:
Quote:

> >> "Pietro84" <mistak...@xxxxxx> wrote in message
>
Quote:
Quote:

> >>news:58aa6f94-278f-4d83-bf78-3dd93178c5b5@xxxxxx
>
Quote:
Quote:

> >> >i have try to change tshi attribute whit script...but dont work. the
> >> > script dont return an error but the attribute dont change...why?
>
Quote:
Quote:

> >> The only values that can be assigned to this attribute are 0 and -1.
>
Quote:
Quote:

> >> --
> >> Richard Mueller
> >> MVP Directory Services
> >> Hilltop Lab -http://www.rlmueller.net
> >> --
>
Quote:

> > i try this
>
Quote:

> > ' Bind to Active Directory Domain
> > Set objRootDSE = GetObject("LDAP://RootDSE")
> > strDNSDomain = objRootDSE.Get("DefaultNamingContext")
>
Quote:

> > Set objOU =GetObject("LDAP://CN=prova,OU=Segretariato
> > Generale,OU=Utenti Dominio,DC=ministero,DC=comunicazioni,DC=priv")
> > objOU.Put "pwdLastSet", -1
> > objOU.SetInfo
>
Quote:

> > but dont work...0 yes...but -1 no
>
> If the previous value of pwdLastSet is 0, assigning the value -1 results in
> Active Directory actually making the value equivalent to the current
> date/time (as if the user just changed their password). If the previous
> value of pwdLastSet is any other value (even if the password is expired),
> assigning the value -1 results in no change. If you want the value of
> pwdLastSet to be equivalent to the current time, first assign 0, then
> assign -1.
>
> I don't find this documented, it's based on my experience. It is possible
> the behavior depends on the version of AD. Assigning any other values
> besides 0 or -1 should raise an error.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
tnx work
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
pwdLastSet attribute not updating VB Script
Displaying pwdlastset property of computer account in Active Directory in useful format PowerShell
ADSI pwdLastSet (to UTC or not to UTC) PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46