Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Windows 7 Forum Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Pulling Specfic AD Info

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-11-2008   #1 (permalink)
TimParker
Guest


 

Pulling Specfic AD Info

I have a new task that my boss just "gave me". Apparently he has an
Excel Spreadsheet that he then takes into Visio to create an ORG chart
that is on our Web site. Well its naturally a manual process so, hey
lets get Tim to automate it!

I need to get to the directReports field on the Organization tab to be
able to hopefully loop through the users and create this file. Any
pointers?

TIA.

Tim

My System SpecsSystem Spec
Old 07-11-2008   #2 (permalink)
TimParker
Guest


 

Re: Pulling Specfic AD Info

Nevermind, I think I found a reference that I had stumbled across
once, lost and now found again!

http://www.wisesoft.co.uk/Scripts/ac...oryschema.aspx

This should hopefully get me going in the right direction.



On Jul 11, 8:40*am, TimParker <tim...@xxxxxx> wrote:
Quote:

> I have a new task that my boss just "gave me". Apparently he has an
> Excel Spreadsheet that he then takes into Visio to create an ORG chart
> that is on our Web site. Well its naturally a manual process so, hey
> lets get Tim to automate it!
>
> I need to get to the directReports field on the Organization tab to be
> able to hopefully loop through the users and create this file. Any
> pointers?
>
> TIA.
>
> Tim
My System SpecsSystem Spec
Old 07-11-2008   #3 (permalink)
/\/\o\/\/ [MVP]
Guest


 

RE: Pulling Specfic AD Info

Somthing like this should work for you :

$as = [adsisearcher]''
gc users.csv |% {
$as.Filter = "CN=$($_.name)"
$ user = $as.FindOne()
$user.Properties.CN
$user.Properties.directReports
}

Enjoy,
Greetings /\/\o\/\/
http://thePowerShellGuy.com

"TimParker" wrote:
Quote:

> I have a new task that my boss just "gave me". Apparently he has an
> Excel Spreadsheet that he then takes into Visio to create an ORG chart
> that is on our Web site. Well its naturally a manual process so, hey
> lets get Tim to automate it!
>
> I need to get to the directReports field on the Organization tab to be
> able to hopefully loop through the users and create this file. Any
> pointers?
>
> TIA.
>
> Tim
>
My System SpecsSystem Spec
Old 07-12-2008   #4 (permalink)
Richard Mueller [MVP]
Guest


 

Re: Pulling Specfic AD Info


"TimParker" <timpar@xxxxxx> wrote in message
news:ae4e6a3e-f66d-4de2-b49b-46c68275e166@xxxxxx
Quote:

>I have a new task that my boss just "gave me". Apparently he has an
> Excel Spreadsheet that he then takes into Visio to create an ORG chart
> that is on our Web site. Well its naturally a manual process so, hey
> lets get Tim to automate it!
>
> I need to get to the directReports field on the Organization tab to be
> able to hopefully loop through the users and create this file. Any
> pointers?
>
> TIA.
>
> Tim
I have a VBScript program that documents the organizational structure
derived from the directReports and manager attributes in AD linked here:

http://www.rlmueller.net/OrganizationalStructure.htm

The output indicates by indenting who reports to whom. The output should be
redirected to a text file. The program can be modified to use semicolons
instead of spaces (indenting) to indicate the reporting structure. This
would allow you to read the text file into a spreadsheet (specifying the
semicolon as the field delimiter). Commas would not work as delimiters
because the directReports attribute is a DN attribute, a collection of
Distinguished Names, so the values contain embedded commas. The modification
would be to replace the following statement:

strOffset = strOffset & " "

with this:

strOffset = strOffset & ";"

and this statement:

Call Reports(strReport, strOffset & " ")

with this:

Call Reports(strReport, strOffset & ";")

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Old 07-13-2008   #5 (permalink)
TimParker
Guest


 

Re: Pulling Specfic AD Info

Thanks. I will also take a look at that, still waiting on the source
XLS file from my boss to see what he expects or wants.

Tim


On Jul 12, 1:05*pm, "Richard Mueller [MVP]" <rlmueller-
nos...@xxxxxx> wrote:
Quote:

> "TimParker" <tim...@xxxxxx> wrote in message
>
> news:ae4e6a3e-f66d-4de2-b49b-46c68275e166@xxxxxx
>
Quote:

> >I have a new task that my boss just "gave me". Apparently he has an
> > Excel Spreadsheet that he then takes into Visio to create an ORG chart
> > that is on our Web site. Well its naturally a manual process so, hey
> > lets get Tim to automate it!
>
Quote:

> > I need to get to the directReports field on the Organization tab to be
> > able to hopefully loop through the users and create this file. Any
> > pointers?
>
Quote:

> > TIA.
>
Quote:

> > Tim
>
> I have a VBScript program that documents the organizational structure
> derived from the directReports and manager attributes in AD linked here:
>
> http://www.rlmueller.net/OrganizationalStructure.htm
>
> The output indicates by indenting who reports to whom. The output should be
> redirected to a text file. The program can be modified to use semicolons
> instead of spaces (indenting) to indicate the reporting structure. This
> would allow you to read the text file into a spreadsheet (specifying the
> semicolon as the field delimiter). Commas would not work as delimiters
> because the directReports attribute is a DN attribute, a collection of
> Distinguished Names, so the values contain embedded commas. The modification
> would be to replace the following statement:
>
> * * strOffset = strOffset & " * "
>
> with this:
>
> * * strOffset = strOffset & ";"
>
> and this statement:
>
> * * Call Reports(strReport, strOffset & " * *")
>
> with this:
>
> * * Call Reports(strReport, strOffset & ";")
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling in scripts from the web DerWildeKaiser PowerShell 1 08-04-2008 10:53 AM
Help pulling machine password age Ben Christian PowerShell 2 03-12-2008 11:51 AM
Something that has me pulling my hair out! Randy Kehrt Vista security 1 12-17-2007 02:46 AM
zap2it pulling the plug Jon Davis Vista music pictures video 3 06-21-2007 01:17 PM
Screen pulling wide David Ratzan Vista performance & maintenance 1 05-08-2007 03:28 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51