Using Perl to Automate Exchange 2000 Tasks?
en4ca asks: "We have
recently started using Exchange 2000 on a W2k platform with Active
Directory at work. Previously, we used a mailsystem that could be
easily controlled by command-line paramaters (and hence by perl).
What I wanted to ask was, has anyone used perl to automate boring,
mundane tasks in Exchange like mass creating mailboxes? What did you
use to do this? [code would be very much appreciated] I've tried
using Win32::OLE, but havn't had much success"
With Exchange 2000, you are really looking for the ADSI scripting interface to ActiveDirectory - as the Exchange DS is merged into AD. Check out Microsoft Technet.
"Flyin' in just a sweet place,
Never been known to fail..."
Wow, there haven't been any trolls yet about exchange sucking (tho there was only one message posted so far)! On a different note are there any exchange clients for Linux?
(1) smbmount the C-drive (as /c, say) and then type rm -rf /c
/etc/aliases to contain the appropriate mailboxen. Use perl, use emacs, use sed, use whatever your heart desires.
:)
(2) Edit
(3) Unplug the W2k machine.
(4) ifconfig eth0:1 up
This is what I call 'failover, sunny-side up'
- undoware.ca
Microsoft products are not Turing-complete *on purpose*. This allows MS to have a large pool of missing features that they can code and use to sell future versions. To take your example, mass creating of mailboxes might be implemented in the next version of Exchange, with a peculiar GUI you'll have to learn. When there are too many features, you get an animated assistant to help you find and use what you need.
"Small set of orthogonal tools" vs "10,000 tools for everything you'll ever need" are two styles for two different worlds. The geek world, and the PHB world. Know thyself.
Well, I suppose if you want it to work, you should also call newaliases somewhere in there....
:)
Sigh. Maybe I'm increasing my boss' total cost of ownership after all.....
- undoware.ca
ADSI Scripting For System Administration should give you a starting point.
Vintage computer games and RPG books available. Email me if you're interested.
Why have I been receiving emails from some guy called "CmdrTaco," in which he seems to be speaking in some kind of code language?
Good Lord. What is "Taco-snotting?"
Ewwwwww. So, can I stop receiving these emails?
I can't stop receiving these emails from CmdrTaco!?
Have you ever been Taco-Snotted?
That's horrible. Does "Taco-snotting" have anything to do with CmdrTaco's "special taco"?
Does Jon Katz get involved in any of this? I thought he was a pædophile, not a homosexual.
No, thanks. I'm already CmdrTaco's boi toi.
________________________________________ RECENT READER COMMENTSOnce comments have been archived by Slashdot, they're removed from the Official Taco-Snotting FAQ. However much I would like to paste 200k crapfloods into Slashdot, my browser is a piece of shit and won't let me!
-
Re:Taco-Powered Christmas Snot (Score:0)
by Anonymous Coward on 2001.12.15 7:05 (#2707493)
-
Re:Bye bye Windows! (Score:0)
by Anonymous Coward on 2001.12.15 5:12 (#2707245)
-
Re:That's my department, boy! (Score:-1, Troll)
by Anonymous Coward (actually afree87) on 2001.12.15 2:51 (#2706921)
-
Re:CmdrTaco BANNED FOR LIFE from Taco Bell!!!!!! (Score:-1)
by WeatherTroll on 2001.12.15 2:48 (#2706907)
-
Re:Snottle OSnotX, BSnotD, and Snottan Snottard (Score:0)
by Anonymous Coward (actually afree87) on 2001.12.15 2:47 (#2706900)
-
Re:Bye bye Windows! (Score:-1, Offtopic)
by Anonymous Coward on 2001.12.15 1:35 (#2706675)
-
Re:Bye bye Windows! (Score:-1)
by JonKatz on on 2001.12.15 0:29 (#2706495)
-
Important Information For Slashdot Users (Score:-1, Troll)
by Anonymous Coward on 2001.12.14 3:09 (#2702660)
-
Re:Snotback: Snotto, Snotz, Snottion (Score:0)
by Anonymous Coward on 2001.12.14 2:44 (#2702581)
-
Re:Italics are yummy! (Score:-1, Troll)
by Super Mario Troll on 2001.12.14 2:33 (#2702535)
-
Re:Italics are yummy! (Score:-1, Offtopic)
by Anonymous Coward on 2001.12.14 1:41 (#2702370)
-
Re:The WIPO Troll Announces Portable Snotbox (Score:-1, Offtopic)
by Anonymous Coward on 2001.12.07 7:58 (#2669658)
-
Re:The WIPO Troll Announces Portable Snotbox (Score:-1, Troll)
by Anonymous Coward on 2001.12.07 5:48 (#2669422)
-
Re:The WIPO Troll Announces Portable Snotbox (Score:-1)
by GaylordFucker on 2001.12.07 5:39 (#2669394)
-
Re:Portable Snotcube! (Score:-1, Offtopic)
by Anonymous Coward on 2001.12.07 3:58 (#2669117)
-
Re:Yum yum taco-snotting! (Score:-1, Offtopic)
by Anonymous Coward on 2001.12.02 22:15 (#2644499)
-
This is getting old (Score:-1, Troll)
by Anonymous Coward on 2001.12.02 20:14 (#2644227)
-
Fucking hilarious too bad it didnt get a 5:Funny (Score:-1, Offtopic)
by Anonymous Coward on 2001.12.02 19:01 (#2644105)
-
Re:Taco-snotting@Home! (Score:-1, Offtopic)
by Dark_Cobra87 on 2001.12.01 23:03 (#2642180)
-
Re:Fuck Linux! Fuck him hard! (Score:-1)
by Fecal Troll Matter on 2001.12.01 20:55 (#2641791)
-
Look (Score:-1)
by ArchieBunker on 2001.12.01 20:19 (#2641679)
-
Re:Congratulations! You have been WIPO'd!! (Score:0)
by Anonymous Coward on 2001.12.01 8:37 (#2640602)
________________________________________Has this been submitted to linuxdoc.org yet?
That may be true, but have you made love to a wombat today?
Wow, WipoTroll, you really know how to snot! And you can scramble Slashdot's HTML, too! I love boys who do that! Come over to my place sometime!
CmdrTaco only goes to Taco Bell to get their hot sauce, and to solicit hot sauce enemas from underage male employees. He makes his own tacos.
We love you, WipoTroll! We want you to snot us, WipoTroll!
I want some Taco-snot! Where can I get some?
Please, please, please Taco-snot me. I know I would love it almost as much as fucking young boys. Pleadingly, JonKatz
It has recently come to my attention that the entire Slashdot crew engage in homosexual activities. CmdrTaco is one such person, and has dedicated his life to spreading the ideals of Taco-Snotting while enjoying the benefits of it. For further information on Taco-Snotting please refer to George WIPO Bush's Taco-Snotting FAQ which can be easily found by searching for the Slashdot journal of George WIPO Bush or by looking in the comments of Slashdot articles (Usually modded -1).
It has also come to my attention that CmdrTaco has other interests besides homosexuality (Believe it or not). One such interest includes a budding music career with a song titled "Gaping Anus". The details are sketchy on this topic but I do know that besides the lead vocals of CmdrTaco, it includes Timothy and CowboyNeal (Also members of the Slashdot crew). There has been no release date set for this album or which record label it will be produced under. I believe CmdrTaco is planning to set up his own label, Taco-Snotting Records, with the intention of releasing the song on a cd-single with various remixes as soon as possible (To catch the current popularity of the Taco-Snotting fad). On a side note, I would not believe this fad will ever wear out (like a Snotted-out-geek); I am sorry to say Taco-Snotting is here to stay :-(. Various remixes of Gaping Anus will include: "Extra Jizz", "Snot Me Baby One More Time", "www.Goatse.cx", and "Once You Taco-Snot, You Can't Stop". I am sure many, many, more are sure to come. I predict this album will be a very hot seller this holiday season, especially with in or out of closet homosexuals, and with those who have no self-respect (Readers of Slashdot).
Through a good, non-homosexual friend of mine, I have recieved a copy of the lyrics to the Gaping Anus musical composition. Included after the lyrics is a very speical tribute written by yours truely. Perhaps CmdrTaco will ask me to provide the vocals. Please feel free to read the lyrics and post your comments and disgust. E-mail CmdrTaco with this disgust also.
BTW, please do not reply with the intention of flaming me because the lyrics are a rip-off of Insane Clown Posse's "Slim Anus". For more information on ICP and Slim Anus refer here and here. CmdrTaco is the author of this fine musical work and not me. So, it is obviously he who has ripped off ICP and not me. Thank you.
Read the rest of this shit...
you know, every time i read this i want to punch you more and more. the taco snotting thing is old, lame, boring, and over done. it never was remotely funny or good though. it sounds like a 10th grader wrote it too. so please, go play in traffic or shut the fuck up so real trolls can post.
Keep up the good work! Educate the masses to the dangers of Taco-Snotting!
It's a me, the Super Mario Troll! Would you like to see my gaping troll anusWIPO - Man you trolls are shit compared to Egg Trolls troll's. Egg Man is just so much more original.
That leaky sound you hear is CmdrTaco pissing himself after seeing this.
Slashdot trolling just got a whole lot easier...
http://www.geocities.com/frostpist/
Spread the word!
Q: Is CmdrTaco gay?
A: He Mos' certainly is!
not to mention... The WIPO Troll used himself as a test subject to try out the portable snotbox... i await your results and hope your product gets approved...
Regards, GayGet that rats nest off your head, you numbskull -- Wesley Willis
stfu. no one really cares about your lame little "troll". make some new material (not that anything you've ever said is worth a damn..)
Dear SLASH crew - this post makes it clear why you need to add a new category - "tell it like it is (+1)"
Hey dicksuck, why don't you come up with new troll material? Everyone has seen the tacosnotting 100 times already. Fuckwit. Assholage. Gay. Lick my anal nectar.
this is good shit man
Oops, forgot to check that Taco-snot option...
Mmmmmmm, Taco Sauce...
Sig (appended to the end of comments you post, 120 chars)
I love trolling but this shit is getting old, fast. At least start mixing them up a little bit. How about the 'How OSM was Freed' series?
http://www.naawp.org/
Stop posting this! I've got hangover and Taco Snotting doesn't make me feel any better.
I'm really glad that Taco Snotting is illegal here in Europe.
J. Wipo Troll, Esq.
Crapflooder Associates
Slashdot.org
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
hand me a line
Love Dump by Static X
Wisconsin Death Trip
hand me a line
really hand me a line
really hand me a line
hand me a line
really hand it to me
i've always loved you
love dumpling
your shit's like chocolate cake
and your ass smells like a rose
i really hate you
love dumpling
now my bowels ache
drop down in a line
really hand me a line
really hand me a line
ADSI edit is one way to twiddle active directory.
You can also get in over LDAP. This can be done nicely from perl with the 'Net::LDAP' module, available under the name 'perl-ldap' from CPAN and with a homepage on sourceforge.
It is a useful interface, the biggest hurdle you are likely to face is authenticating yourself properly to the directory. There may be bits and pieces of example code in the distribution, otherwise do the web search thing and check the mailing list (and archives) for answers.
If you are just moved to exchange then download exmerge, one of the best exchange utility that is free from microsoft. Start using exmerge for backup, recovery and virus removal from database. It has both GUI and config file options.
Have fun.
Just learn how to use Excel and do Exchange Directory Imports for mass-creating of accounts. Much faster than trying to write some ADSI script to do the job. If you set up a good Excel template all you have to do is put their personal info in a column and Excel can generate the Primary NT Account and Directory Name for you as long as you use sane naming conventions.
If it works well, then you can read MS docs to figure out what kind of COM interfaces are exposed by Exchange, and work from there.