![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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? -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
| | #3 (permalink) |
| | 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 > -- ' 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 Specs![]() |
| | #4 (permalink) |
| | 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 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 Specs![]() |
| | #5 (permalink) |
| | 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 > -- ![]() |
My System Specs![]() |
![]() |
| 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 | |||