header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
error when resetting a users password
Last Post 17 May 2010 04:37 AM by Dave. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
DaveUser is Offline
New Member
New Member
Posts:1
Avatar

--
17 May 2010 04:37 AM
    Hi I am trying to write an all singing and dancing script in power shell at the moment to process leavers, ie disable the user, change the OU to leavers, remove group memberships, set mail forwarding. The problem I am getting is I need to reset the users password in order to set their Out Of Office as only the mailbox owner has permissions to do this. The relevant code from the script I am writing to this issue is #Get full name of user to work with $cname = Read-Host "Enter Full Name of Leaver" #Create ADSI Connection $userAD = [ADSI]"LDAP://CN=$cname,OU=Users,OU=London,DC=MYDOMAIN,DC=MYTLD" #Reset Users Password to Printer123 $userAD.Invoke("setpassword","Printer123") Now if I run this code from my desktop it runs fine but If I run it from the exchange server I get the following error: Exception calling "Invoke" with "2" argument(s): "Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERN OTFOUND))" At line:1 char:15 I have to run this script from the exchange server for the OOF setting script to work so really need to get this going. Anyone got any ideas
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer