#167162 - 2006-09-09 12:34 AM
How to remove a users SMTP and X400 addresses
|
Gerald_G
Fresh Scripter
Registered: 2005-04-11
Posts: 34
Loc: Canada
|
Hi.
I have searched the forums, and read the threads re: reading and changing the values in the proxyAddresses attribute.
example...
Code:
$ProxyArray = $User.ProxyAddresses For Each $ProxyAddr In $ProxyArray ? $ProxyAddr Next
What I would like to know is how to remove those attributes from a user using Kix scripts.
Any help would be appreciated.
|
Top
|
|
|
|
#167164 - 2006-09-09 01:10 AM
Re: How to remove a users SMTP and X400 addresses
|
Gerald_G
Fresh Scripter
Registered: 2005-04-11
Posts: 34
Loc: Canada
|
With some more reading on this board I came up with the following.
Code:
$adsUser.putEX(1, "proxyAddresses", "") $adsUser.setinfo $adsUser.FirstName = $firstname $adsUser.LastName = $lastname $adsUser.displayName = $disp $adsUser.SetInfo $adsUser.mail = $firstname + "." + $lastname + "@@domain.ab.ca" $adsUser.SetInfo
This is what I plan to use if a person changes one of their names.
It first removed the SMTP and X400 mail addresses. Then it changes the persons names in AD, and Display name. (Coding above to set these as needed) Then I send out the new email address as firstname.lastname@domain
This way the recipient policy can actively check for duplicate addresses and if they are going to exist, deal with it.
I just changed 5 test users to have the same firstname.lastname and it works good. The policy gives them non-duplicate addresses.
I need this since I get all of my user info from a database, and name changes are routine. Script can handle this without manual intervention.
|
Top
|
|
|
|
#167171 - 2006-09-12 05:10 PM
Re: How to remove a users SMTP and X400 addresses
|
Gerald_G
Fresh Scripter
Registered: 2005-04-11
Posts: 34
Loc: Canada
|
Quote:
Our company auditors say name changes are forbidden unless there are extreme circumstances. The users account name stays the same from hire to fire.
My company is a college, and these are student accounts. We view students as clients (since they pay $$ to attend college) and try to give them good service in as many areas as we can.
Imagine a company client who gets married and or legally changes their name, and then you company insists that they use their old name for the length of their relationship with your company. I'd predict a short relationship.
My script is working now so thanks for the comments everyone.
|
Top
|
|
|
|
#167173 - 2006-09-13 08:24 AM
Re: How to remove a users SMTP and X400 addresses
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Quote:
It all depends in what kind of regulatory environment you're working.
Perhaps but I know of no US regulatory mandates prohibiting change, thus I would think it is more of a Company policy or choice rather than from a Government regulator policy or law.
|
Top
|
|
|
|
#167174 - 2006-09-28 09:04 PM
Re: How to remove a users SMTP and X400 addresses
|
masken
MM club member
Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
|
lol.. in my eyes, IT would be lazy if this wasn't possible. In most cases in larger companies, AD account administration would be delegated and a name change natural. As mentioned, the SID is still the same. As Bröjn says, if the name change isn't reflected ppl would get problems with all kinds of paper, administration, and e-mail addresses...
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
0 registered
and 128 anonymous users online.
|
|
|