Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

 

When subscribed to the list you should use your standard email client to send your posts to ActiveDir@mail.activedir.org.

List Archives

Subject: [ActiveDir] PoSH directReports
Prev Next
You are not authorized to post a reply.

AuthorMessages
robertsingersUser is Offline

Posts:505

06/29/2009 4:42 AM  
Hi all. I have been asked if I can create a script that containers an
employee and all of their direct reports. So I query the directReports
attribute like so

Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties
-IncludedProperties DirectReports

and I get back a NoteProperty. So now I'm confused about what I can do
with that NoteProperty. I'd like to turn it into an aray of DNs of
users. Can I do that or am I barking up the wrong tree using the
GetQADuser cmdlet?
#############################################################################################
This e-mail message has been scanned for Viruses and cleared by NetIQ MailMarshal.
##############################################################################################

############################################################
PLEASE NOTE:

The information contained in this email message and any
attached files may be confidential and subject to privilege.
Any opinions expressed in this message are not necessarily
those of the Department of Building and Housing. All technical
opinions are offered on a ?no-liability? basis. This message
and any files transmitted with it are confidential and solely
for the use of the intended recipient. If you are not the
intended recipient, you are notified that any use, disclosure
or copying of this email is unauthorised. If you have received
this email in error, please notify us immediately by reply email
and delete the original and any attachment(s). Thank you.
############################################################
dejiUser is Offline

Posts:259

06/29/2009 4:58 AM  
Must this be done in PoSH?


Sincerely,
_____
(, / | /) /) /)
/---| (/_ ______ ___// _ // _
) / |_/(__(_) // (_(_)(/_(_(_/(__(/_
(_/ /)
(/
www.akomolafe.name - we know IT
-5.75, -3.23
Do you now realize that Today is the Tomorrow you were worried about Yesterday? -anon
________________________________________
From: activedir-owner@mail.activedir.org [activedir-owner@mail.activedir.org] On Behalf Of Robert Singers [robert.singers@dbh.govt.nz]
Sent: Sunday, June 28, 2009 8:41 PM
To: ActiveDir@mail.activedir.org
Subject: [ActiveDir] PoSH directReports

Hi all. I have been asked if I can create a script that containers an
employee and all of their direct reports. So I query the directReports
attribute like so

Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties
-IncludedProperties DirectReports

and I get back a NoteProperty. So now I'm confused about what I can do
with that NoteProperty. I'd like to turn it into an aray of DNs of
users. Can I do that or am I barking up the wrong tree using the
GetQADuser cmdlet?
#############################################################################################
This e-mail message has been scanned for Viruses and cleared by NetIQ MailMarshal.
##############################################################################################

############################################################
PLEASE NOTE:

The information contained in this email message and any
attached files may be confidential and subject to privilege.
Any opinions expressed in this message are not necessarily
those of the Department of Building and Housing. All technical
opinions are offered on a ?no-liability? basis. This message
and any files transmitted with it are confidential and solely
for the use of the intended recipient. If you are not the
intended recipient, you are notified that any use, disclosure
or copying of this email is unauthorised. If you have received
this email in error, please notify us immediately by reply email
and delete the original and any attachment(s). Thank you.
############################################################
robertsingersUser is Offline

Posts:505

06/29/2009 5:02 AM  
By preference yes, as the rest of the AD maintenace scripts are now PoSH
and it's a reasonable expectation to have Operations learn poSH.




-----Original Message-----
From: activedir-owner@mail.activedir.org
[mailto:activedir-owner@mail.activedir.org] On Behalf Of Akomolafe, Deji
Sent: Monday, 29 June 2009 3:58 p.m.
To: activedir@mail.activedir.org
Subject: RE: [ActiveDir] PoSH directReports

Must this be done in PoSH?


Sincerely,
_____
(, / | /) /) /)
/---| (/_ ______ ___// _ // _
) / |_/(__(_) // (_(_)(/_(_(_/(__(/_
(_/ /)
(/
www.akomolafe.name - we know IT
-5.75, -3.23
Do you now realize that Today is the Tomorrow you were worried about
Yesterday? -anon ________________________________________
From: activedir-owner@mail.activedir.org
[activedir-owner@mail.activedir.org] On Behalf Of Robert Singers
[robert.singers@dbh.govt.nz]
Sent: Sunday, June 28, 2009 8:41 PM
To: ActiveDir@mail.activedir.org
Subject: [ActiveDir] PoSH directReports

Hi all. I have been asked if I can create a script that containers an
employee and all of their direct reports. So I query the directReports
attribute like so

Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties
-IncludedProperties DirectReports

and I get back a NoteProperty. So now I'm confused about what I can do
with that NoteProperty. I'd like to turn it into an aray of DNs of
users. Can I do that or am I barking up the wrong tree using the
GetQADuser cmdlet?
########################################################################
#####################
This e-mail message has been scanned for Viruses and cleared by NetIQ
MailMarshal.
########################################################################
######################

############################################################
PLEASE NOTE:

The information contained in this email message and any attached files
may be confidential and subject to privilege.
Any opinions expressed in this message are not necessarily those of the
Department of Building and Housing. All technical opinions are offered
on a ?no-liability? basis. This message and any files transmitted with
it are confidential and solely for the use of the intended recipient. If
you are not the intended recipient, you are notified that any use,
disclosure or copying of this email is unauthorised. If you have
received this email in error, please notify us immediately by reply
email and delete the original and any attachment(s). Thank you.
############################################################
Chris-DentUser is Offline

Posts:73

06/29/2009 9:15 AM  

Hi Robert,

This will give you a simple string array of the direct reports for that
user:

(Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties `
-IncludedProperties DirectReports).DirectReports

Chris

--------------------------------------------------
From: "Robert Singers" <robert.singers@dbh.govt.nz>
Sent: Monday, June 29, 2009 4:41 AM
To: <ActiveDir@mail.activedir.org>
Subject: [ActiveDir] PoSH directReports

> Hi all. I have been asked if I can create a script that containers an
> employee and all of their direct reports. So I query the directReports
> attribute like so
>
> Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties
> -IncludedProperties DirectReports
>
> and I get back a NoteProperty. So now I'm confused about what I can do
> with that NoteProperty. I'd like to turn it into an aray of DNs of
> users. Can I do that or am I barking up the wrong tree using the
> GetQADuser cmdlet?
> #############################################################################################
> This e-mail message has been scanned for Viruses and cleared by NetIQ
> MailMarshal.
> ##############################################################################################
>
> ############################################################
> PLEASE NOTE:
>
> The information contained in this email message and any
> attached files may be confidential and subject to privilege.
> Any opinions expressed in this message are not necessarily
> those of the Department of Building and Housing. All technical
> opinions are offered on a 'no-liability' basis. This message
> and any files transmitted with it are confidential and solely
> for the use of the intended recipient. If you are not the
> intended recipient, you are notified that any use, disclosure
> or copying of this email is unauthorised. If you have received
> this email in error, please notify us immediately by reply email
> and delete the original and any attachment(s). Thank you.
> ############################################################
>
robertsingersUser is Offline

Posts:505

06/29/2009 11:17 AM  
Cool thanks for that, that works a treat.

-----Original Message-----
From: activedir-owner@mail.activedir.org
[mailto:activedir-owner@mail.activedir.org] On Behalf Of Chris Dent
Sent: Monday, 29 June 2009 8:12 p.m.
To: activedir@mail.activedir.org
Subject: Re: [ActiveDir] PoSH directReports


Hi Robert,

This will give you a simple string array of the direct reports for that
user:

(Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties `
-IncludedProperties DirectReports).DirectReports

Chris

--------------------------------------------------
From: "Robert Singers" <robert.singers@dbh.govt.nz>
Sent: Monday, June 29, 2009 4:41 AM
To: <ActiveDir@mail.activedir.org>
Subject: [ActiveDir] PoSH directReports

> Hi all. I have been asked if I can create a script that containers an

> employee and all of their direct reports. So I query the
> directReports attribute like so
>
> Get-QADUser "Joe Average Manager" -DontUseDefaultIncludedProperties
> -IncludedProperties DirectReports
>
> and I get back a NoteProperty. So now I'm confused about what I can
> do with that NoteProperty. I'd like to turn it into an aray of DNs of

> users. Can I do that or am I barking up the wrong tree using the
> GetQADuser cmdlet?
> ######################################################################
> ####################### This e-mail message has been scanned for
> Viruses and cleared by NetIQ MailMarshal.
> ######################################################################
> ########################
>
> ############################################################
> PLEASE NOTE:
>
> The information contained in this email message and any attached files

> may be confidential and subject to privilege.
> Any opinions expressed in this message are not necessarily those of
> the Department of Building and Housing. All technical opinions are
> offered on a 'no-liability' basis. This message and any files
> transmitted with it are confidential and solely for the use of the
> intended recipient. If you are not the intended recipient, you are
> notified that any use, disclosure or copying of this email is
> unauthorised. If you have received this email in error, please notify
> us immediately by reply email and delete the original and any
> attachment(s). Thank you.
> ############################################################
>
You are not authorized to post a reply.
Forums >ActiveDir Mail List Archive >List Archives > [ActiveDir] PoSH directReports



ActiveForums 3.7
Friends

Friends

VisualClickButoton
Members

Members

MembershipMembership:
Latest New UserLatest:mish
New TodayNew Today:2
New YesterdayNew Yesterday:5
User CountOverall:4858

People OnlinePeople Online:
VisitorsVisitors:61
MembersMembers:0
TotalTotal:61

Online NowOnline Now:

Ads

Copyright 2009 ActiveDir.org
Terms Of Use