header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

MustChangePassword
Last Post 10 Jan 2008 11:20 PM by yefimovah. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
yefimovahUser is Offline
New Member
New Member
Posts:24
Avatar

--
10 Jan 2008 10:18 PM  

Hi,

I'm trying to sort out how I set the password must be changed attribute using powershell.

I've seen .Put("pwdLastSet", 0)$ObjUser.setInfo() 

$ObjUser

= [ADSI]"LDAP://$strValue"

$ObjUser

 

 

But that doesn't seem to work.

Any ideas out there?

thanks,

Anatoli

yefimovahUser is Offline
New Member
New Member
Posts:24
Avatar

--
10 Jan 2008 10:21 PM  

 

 

That should have looked like the below.

 

$ObjUser = [ADSI]"LDAP://$strValue"

$ObjUser.Put("pwdLastSet", 0)

$ObjUser.setInfo() 

bsonposhUser is Offline
Basic Member
Basic Member
Posts:392
Avatar

--
10 Jan 2008 10:53 PM  
I cant test this ATM but try this.

$ObjUser = [ADSI]"LDAP://$strValue"
$ObjUser.psbase.Put("pwdLastSet", 0)
$ObjUser.setInfo()

Do you get an Error? What happens?
Brandon Shell
----------------
Microsoft Powershell MVP
https://mvp.support.microsoft.com/profile/Brandon
Blog: http://www.bsonposh.com
bsonposhUser is Offline
Basic Member
Basic Member
Posts:392
Avatar

--
10 Jan 2008 11:03 PM  
I just tried this and it worked.

$ObjUser = [ADSI]"LDAP://$strValue"
$ObjUser.Put("pwdLastSet",0)
$ObjUser.setInfo()
Brandon Shell
----------------
Microsoft Powershell MVP
https://mvp.support.microsoft.com/profile/Brandon
Blog: http://www.bsonposh.com
yefimovahUser is Offline
New Member
New Member
Posts:24
Avatar

--
10 Jan 2008 11:20 PM  

Yeah, nothing worse then asking for help and then realizing the issue.

It's worknig for me as well.

thank you.

Anatoli

 

You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer