| Author | Messages | |
robertsingers
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. ############################################################
| | | |
| deji
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. ############################################################ | | | |
| robertsingers
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-Dent
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. > ############################################################ >
| | | |
| robertsingers
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. > ############################################################ >
| | | |
|
|