Page 1 of 1 1
Topic Options
#167162 - 2006-09-09 12:34 AM How to remove a users SMTP and X400 addresses
Gerald_G Offline
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
#167163 - 2006-09-09 01:07 AM Re: How to remove a users SMTP and X400 addresses
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
where did that code come from?
it's not full functional code as you pasted it.
where is that thread you referenced?
does it hold the code?
could you pass a link?
could you post the whole code segment?

Top
#167164 - 2006-09-09 01:10 AM Re: How to remove a users SMTP and X400 addresses
Gerald_G Offline
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
#167165 - 2006-09-09 01:46 AM Re: How to remove a users SMTP and X400 addresses
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Our company auditors say name changes are forbidden unless there are extreme circumstances. The users account name stays the same from hire to fire.
Top
#167166 - 2006-09-11 09:39 AM Re: How to remove a users SMTP and X400 addresses
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Les, what if someone marries/remarries/divorces? Doesn't last name change then? thus - a name change.. =
Top
#167167 - 2006-09-11 11:15 AM Re: How to remove a users SMTP and X400 addresses
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
For women, we use their girls name.
This is for the creation of user id's and email addresses.

Top
#167168 - 2006-09-11 05:59 PM Re: How to remove a users SMTP and X400 addresses
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
(re)marriage or divorce is not grounds for a name change, only in some cases were there were criminal charges (like shameful/hateful crime, etc.) surrounding the divorce.
Top
#167169 - 2006-09-11 07:44 PM Re: How to remove a users SMTP and X400 addresses
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Well even Disney with over 70,000 accounts allowed name change for such changes in ones life.
The underlying GUID remains the same, the name changes are just for us humans, not the computer.

If the Company Les works for is that stringent that is their perogative however I wouldn't think that to be true for most Companies.

Top
#167170 - 2006-09-12 09:53 AM Re: How to remove a users SMTP and X400 addresses
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
If a company here in Sweden would have and apply the same policy regarding just a namechange of an account, wow, there would be problems, plenty of it. No registry would be correct at that company after a while.. ;P
Top
#167171 - 2006-09-12 05:10 PM Re: How to remove a users SMTP and X400 addresses
Gerald_G Offline
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
#167172 - 2006-09-13 05:04 AM Re: How to remove a users SMTP and X400 addresses
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
It all depends in what kind of regulatory environment you're working.
_________________________
There are two types of vessels, submarines and targets.

Top
#167173 - 2006-09-13 08:24 AM Re: How to remove a users SMTP and X400 addresses
NTDOC Administrator Offline
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 Offline
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
#167175 - 2006-09-28 09:14 PM Re: How to remove a users SMTP and X400 addresses
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

As mentioned, the SID is still the same.



Fine in the Bill Gates artificial realm but in a multi-platform environment ruled by auditors, it is not so simple.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 128 anonymous users online.
Newest Members
SERoyalty, mytar, Gabriel, Alex_Evos, Dansen
17869 Registered Users

Generated in 0.066 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org