Solved

help to modify this script

Posted on 2011-03-09
2
355 Views
Last Modified: 2012-05-11
Hello,

i have this script and i need to add for the resulted file the OU of user.

function str {$args}  
  
$attribs = str name, givenName, sn, Mail, telephoneNumber, facsimileTelephoneNumber, department, title, physicalDeliveryOfficeName, streetAddress,   
    postOfficeBox, postalCode, extensionAttribute1, extensionAttribute2, extensionAttribute4  
  
Get-QADUser -IncludedProperties $attribs -SizeLimit 0 | Select-Object -Property $attribs | Export-Csv -Path c:\yourfile.csv -NoTypeInformation

Open in new window



thanks for your help
0
Comment
Question by:cawasaki
2 Comments
 
LVL 4

Accepted Solution

by:
loki_loki earned 500 total points
ID: 35082291
adding parentcontainerdn or parentcontainer to $attribs would either give the ou's distinguishedname or domain/ou/ou format.  Does that helps or do you just want the name of the ou, without a path?
0
 

Author Comment

by:cawasaki
ID: 35093834
Hi,

i have used parentcontainerdn and work fine.

thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question