This blog is by design...

Thursday, June 02, 2005

VBSCRIPT - For all domain users, write all their Delegate information to a file

The following script will recurse (go through) your AD structure,
and for all user accounts it will take their Outlook delegate information
and write it out to a file. Until recently I didn't realize that delegate
information that was set inside the Outlook client was stored in AD, but
guess what. It is. Give it a try...

'*****************************************************
'you MAY NOT post this script on any other website
'you MAY post a link to the script, thus giving me my due credit for
'writing it.

Set objRootDSE = GetObject("LDAP://rootDSE")
Set objDomainRoot = GetObject("LDAP://"& _
objRootDSE.Get("defaultNamingContext"))

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOutputFile = objFSO.CreateTextFile("c:\Delegates.txt", True)

For Each objItem in objDomainRoot
'wscript.Echo objItem.Name
If objItem.Class="organizationalUnit" Then
OURecurse objItem.ADSPath
end if

If objItem.Class="user" Then
'wscript.Echo objItem.name
ProcessUsers objItem
End If
Next

objOutputFile.Close
set objOutputFile = Nothing
set objRootDSE = Nothing
set objDomainRoot = Nothing
set objFSO = Nothing

wscript.Echo "All Done"


'***************************************************
Sub ProcessUsers(objUsers)
On Error Resume Next

'wscript.Echo objUsers.Name
set objPD = GetObject("LDAP://"& _
objUsers.distinguishedName)
objOutputFile.Writeline objPD.displayName
delegateList = objPD.GetEx("publicDelegates")
For Each Desc In delegateList
objOutputFile.Writeline Desc
Next
objOutputFile.Writeline

set objPD = Nothing

End Sub


'*************************************************
' This sub is responsible for going through the AD Structure

Sub OURecurse(objFirst)


Dim objOrgUnit, objItem

Set objOrgUnit = GetObject(objFirst)
For Each objItem in objOrgUnit
If objItem.Class="user" Then
'wscript.Echo objItem.Name
ProcessUsers objItem
End If

If objItem.Class="organizationalUnit" Then
'wscript.Echo objItem.Name
OURecurse objItem.ADSPath
End If
Next

Set objOrgUnit = Nothing

End Sub
'***************************************************

'you MAY NOT post this script on any other website
'you MAY post a link to the script, thus giving me my due credit for
'writing it.

45 Comments:

  • great script kris. thanks!

    By Anonymous Anonymous, at 6:06 PM  

  • Great script! When I ran this & then went into a particular user's mbx to verify what others' rights were (to contacts or inbox or whatever) they actually had none. So I was hoping your script could be modified to show the rights another user has right in the txt file. Any thoughts? Thx in advance!

    By Anonymous Anonymous, at 2:30 PM  

  • All I can say is awesome! Just what I needed and very simple! Thank you very much for your help. -Chris

    By Anonymous Anonymous, at 4:45 PM  

  • Great script Kris! I really appreciate it and this information wil be extremely helpful.

    Any chance you can include SIDS where users have been deleted? I am trying to clean up some delegate access that is causing a bunch of NDR's.

    By Blogger Chris, at 7:17 PM  

  • Great script. It helped me to solve the delegate issue. Thanks alot.

    By Anonymous daye, at 2:12 PM  

  • Is there a way to show what delegate rights have been allowed for each user to a particular mailbox?

    By Blogger Sean McGilvray, at 2:07 PM  

  • if wow gold and maple story mesos wow gold

    By Blogger rduht, at 2:13 AM  

  • mcloving this

    By Blogger SleekGeek, at 7:32 PM  

  • Keep up the good work. general health Read a useful article about tramadol tramadol

    By Anonymous Anonymous, at 8:59 AM  

  • Attractive component of content. I simply stumbled upon your website and in accession capital to assert that I
    acquire in fact enjoyed account your weblog posts.
    Any way I'll be subscribing to your feeds or even I fulfillment you get right of entry to persistently rapidly.

    My page does phen375 actually work

    By Anonymous Anonymous, at 5:05 AM  

  • Nice weblog right here! Additionally your web site a lot up very fast!
    What host are you the use of? Can I am getting your affiliate hyperlink to your host?
    I desire my web site loaded up as fast as yours lol

    My web page diets that work

    By Anonymous Anonymous, at 11:34 AM  

  • Hi there, I found your blog by way of Google
    even as searching for a related topic, your website got
    here up, it appears to be like good. I have bookmarked it in
    my google bookmarks.
    Hi there, just turned into aware of your blog thru Google, and found that it's really informative. I am gonna be careful for brussels. I'll be grateful in case you continue
    this in future. Numerous other people shall be benefited from your writing.
    Cheers!

    my website: diets that work fast for women

    By Anonymous Anonymous, at 8:45 AM  

  • Thank you for the good writeup. It if truth be told used
    to be a entertainment account it. Look complicated to
    far brought agreeable from you! By the way, how could we keep in touch?


    Look into my blog post - Waist to Hip ratio

    By Anonymous Anonymous, at 3:40 PM  

  • hello!,I love your writing so a lot! proportion we keep in touch more about your article on AOL?
    I require a specialist on this area to solve my problem.
    May be that is you! Having a look forward to look you.

    Feel free to surf to my webpage :: http://www.Etoro-openbook.tk/

    By Anonymous Anonymous, at 4:41 PM  

  • Hi there, I read your blogs regularly. Your humoristic style is awesome, keep up the good work!


    Visit my blog post; Click now to unnecessary an account together with InstaForex

    By Anonymous Anonymous, at 2:48 PM  

  • I'd like to thank you for the efforts you have put in writing this blog. I'm hoping to check
    out the same high-grade blog posts from you in the
    future as well. In fact, your creative writing abilities has
    encouraged me to get my very own blog now ;)

    My page: Activity Calorie Calculator

    By Anonymous Anonymous, at 5:31 AM  

  • bookmarked!!, I like your blog!

    Also visit my webpage: Big Idea Mastermind

    By Anonymous Anonymous, at 7:17 PM  

  • Until ѕοmeonе told me about this I hadn't even thought it possible. Looks like I'm bеhind on the mаtteг.

    .

    Stοp by my ωеb ѕite ..
    . loan company

    By Anonymous Anonymous, at 1:49 PM  

  • Hey! That’s a extremely great post. I’m very positive I
    will counsel it to my co-workers.If you happen to put up more posts please e mail them to me.



    my site i'm having trouble getting pregnant

    By Anonymous Anonymous, at 7:17 PM  

  • wonderful put up, very informative. I wonder why the other experts of this sector do not notice this.
    You must proceed your writing. I am confident, you have a huge readers' base already!

    Check out my homepage ... book review

    By Anonymous Anonymous, at 8:02 PM  

  • I read this post completely about the comparison
    of hottest and previous technologies, it's awesome article.

    Feel free to surf to my site :: comprehensive auto insurance

    By Anonymous Anonymous, at 6:22 PM  

  • He can hеlp you to decіde the ѕize, shape and
    color of the chanԁelier acсoгding to thе interiors of youг house.
    Thе furгy skin peels off and thе
    аnimals trash theіr antlеrs against ѕaрlings.

    Thesе сan useful whеn you wіѕh
    tо center thе illumіnаtiοn on cеrtaіn
    collectіon that need ѕomе sрecial attentіοn lіke you
    favοrіte antique collection in your
    lіνіng room.

    Feel free to surf tо my web-sіte; chandeliers

    By Anonymous Anonymous, at 8:25 PM  

  • Сollecting nationwidе data to cοmpare аgainst could also help identify if there is аn
    іѕsue wіth the equipmеnt оr ѕimply the output for the time period is deduceԁ because of the day lіght hours
    or other weathеr сonԁitions.
    "This final step in the legal process has wasted much needed time and money and now we, the renewables industry, simply want to get on with creating our clean energy future. The outlook for the jobs in the green industry is bright with promise if legislation is consistently passed to encourage the furtherance of solar and other renewable energy jobs.

    Feel free to visit my web site :: solar energy

    By Anonymous Anonymous, at 9:18 PM  

  • Thanks in support of sharing such a fastidious idea,
    post is fastidious, thats why i have read it completely

    My web site creative group

    By Anonymous Anonymous, at 1:41 AM  

  • So, Rather of investment time in your local loaners business place of business and abiding a marginal of 60 days) a sound checking or nest egg informing
    and a occupier of the United States. You must
    be an quality then it impress the equality of a somebody.
    instant payday loans ukRight now you have an philosophical doctrine derivative
    instrument with flying loans for bad commendation done which is paid once the bills paid.

    By Anonymous Anonymous, at 5:22 AM  

  • Today, this sort of commercial enterprise assistance is offered to receive diminutive cash in hand only in front you get serial pay.
    Also, one does not need to face trouble for fetching
    loan. Fast cash fast loans regarding discharged are very dear
    a effect of the very near forthcoming that has to function your own personal business enterprise desires.
    This dodge tries to work out all your problems
    related in discipline unit religious ritual. There is no in
    by providing you with bantam but important cash sum of money.

    One situation I genuinely like close to car cash place are coating correct now is state able to expend
    their mortgages. payday loansThis
    may change you, but it is a realism and this close to this is the clients FICO commanding.
    You can utilise medium of exchange for many purposes such as unpaid food market bills,
    home renovation, recognition bills, home renovation, approval card dues, nuptials expenses, medical emergencies, costless grocery
    store bills and lots more. The cash is made easy to you easy online.

    By Anonymous Anonymous, at 2:15 PM  

  • I'm gone to say to my little brother, that he should also pay a visit this web site on regular basis to take updated from latest news.

    Take a look at my webpage ... Templates email

    By Anonymous Anonymous, at 9:12 PM  

  • http://www.pregnancyaid.in
    The causes of infertility could have something to do with your body or your partners. Specifically, she wanted to know if there were any strips that could determine baby gender after pregnancy. These cysts sometimes swell and cause the formation of abscess.

    By Anonymous Anonymous, at 5:20 PM  

  • When someone writes an article he/she keeps the image of a user in his/her brain that
    how a user can understand it. So that's why this article is perfect. Thanks!

    My website luxe vakantiehuisje huren **

    By Anonymous Anonymous, at 3:31 PM  

  • Aw, this was an incredibly good post. Finding the time and actual effort to produce a really good
    article… but what can I say… I procrastinate a
    whole lot and never seem to get nearly anything done.


    Check out my web blog ... vakantiehuisje frankrijk

    By Anonymous Anonymous, at 8:49 PM  

  • WOW just what I was looking for. Came here by searching for clear

    My site ... next to

    By Anonymous Anonymous, at 5:23 PM  

  • What i do not realize is in reality how you are not actually much more smartly-liked than you
    might be right now. You're so intelligent. You already know thus significantly with regards to this topic, made me for my part imagine it from so many varied angles. Its like women and men aren't
    fascinated except it is something to do with Girl
    gaga! Your own stuffs outstanding. All the time care for it up!


    Also visit my website - wanny sklep

    By Anonymous Anonymous, at 12:50 PM  

  • An impressive share! I've just forwarded this onto a colleague who has been doing a little research on this. And he in fact bought me dinner simply because I stumbled upon it for him... lol. So let me reword this.... Thanks for the meal!! But yeah, thanx for spending the time to discuss this matter here on your website.

    Feel free to surf to my blog 12 year old golfer misses cut ()

    By Anonymous Anonymous, at 12:39 PM  

  • Fabulous, what a blog it is! This web site gives
    helpful data to us, keep it up.

    Feel free to surf to my blog post food plan :: :
    :

    By Anonymous Anonymous, at 12:31 AM  

  • I’m not that much of a internet reader to be honest
    but your blogs really nice, keep it up! I'll go ahead and bookmark your website to come back down the road. All the best

    my blog post; best iphone golf apps 2012 **

    By Anonymous Anonymous, at 10:41 AM  

  • Attractive section of content. I just stumbled upon your web site and in accession
    capital to assert that I acquire in fact enjoyed account your blog posts.
    Anyway I will be subscribing to your feeds and even I achievement you access
    consistently rapidly.

    My web blog :: onpar golf gps review

    By Anonymous Anonymous, at 12:10 PM  

  • Wonderful, what a website it is! This blog provides valuable
    facts to us, keep it up.

    Feel free to visit my blog: vakantiehuisje frankrijk ()

    By Anonymous Anonymous, at 3:22 AM  

  • I'm really impressed with your writing skills and also with the layout on your blog.
    Is this a paid theme or did you customize it yourself?
    Anyway keep up the excellent quality writing, it is rare to see a nice blog like this one these days.


    Take a look at my blog post; plumbing companies Desert Ridge

    By Anonymous Anonymous, at 5:31 PM  

  • I likе tҺе helpul information you upply in youг articles.

    I will bookmark yor weblog аnd tes once mогe hегe frequently.
    I am гelatively certain I will bbe informed a lot oof neѡ stuff гight ɦere!
    Gօod luck for the follߋwing!

    Feel free to surf tο my page :: diy plans woodwork tables pdf downloand

    By Anonymous Anonymous, at 3:33 PM  

  • I do not even know how I ended up here, but I thought this post was good.
    I do not know who you are but definitely you're going to a famous blogger if you are not already ;) Cheers!


    my webpage: Find Singles Free

    By Anonymous Anonymous, at 4:26 AM  

  • I have read so many articles or reviews on the topic of the blogger lovers except this paragraph is actually a nice piece of writing, keep it up.


    Also visit my web site - my plumber Carefree

    By Anonymous Anonymous, at 3:20 AM  

  • My brother recommended I might like this website. He was totally right.
    This post actually made my day. You cann't
    imagine just how much time I had spent for this information! Thanks!


    my website - health and dental insurance Anaconda Montana

    By Anonymous Anonymous, at 2:05 AM  

  • Quality articles or reviews is the main to invite the users to visit the website,
    that's what this web page is providing.

    my web-site; black diamond bridal set

    By Anonymous Anonymous, at 5:38 AM  

  • Foods from the grocery store might last you all month,
    whereas the organic versions of those same foods at the health
    food store may only last you half the month. When we try to muscle through with
    just conviction as our army we're doing it the hard way.
    It was well known that oats were grown, stored, milled and packaged with wheat products are were typically very contaminated with gluten.

    My web page ... gluten free peanut butter cookies; https://vimeo.com/,

    By Anonymous Anonymous, at 3:06 AM  

  • Thank you for sharing your info. I really appreciate your efforts and I am waiting for your further
    post thank you once again.

    Feel free to visit my homepage - bail bonds richmond va

    By Anonymous Anonymous, at 2:22 PM  

Post a Comment

<< Home