OU path Details

  • 175 Views
  • Last Post 01 August 2016
yogeshcittu posted this 01 August 2016

Hi, Can anyone share PowerShell Script for BULK computers to fetch their OU location details. I have a list of computers where their OU path differs. Eg:
computer1 is located as below
/General/test/lab computer2 is located as below
/local/script/test1 Please help me for the above requirement Thanks and Regards,
Yogesh

Order By: Standard | Newest | Votes
PARRIS posted this 01 August 2016

Do you have a list of computers or do you want to just search to gather a list?




If so you can do a GUI search with the "Published At" field/column showing and then export the results to Excel and munge.




I don't have the syntax to hand to read a CSV to produce a list.





Regards,



 



Mark Parris



 



Active Directory & Cloud Security Consultancy.



 



MVP Enterprise Mobility | MCM Directory Services



Mobile: +44 7801

690596




E-mail: mark@xxxxxxxxxxxxxxxx 



 

Twitter | Blog | LinkedIn | Skype |About.me

 

show

Rajeev Chauhan posted this 01 August 2016

powershell
get-content from file and do for each
get-adcomputer $computername  -prop  CanonicalName


show

bshwjt posted this 01 August 2016

$computers=cat computers.txt
Foreach ($computer in $computers)
{
Get-adcomputer -cn $computet -pr * | select dnshostname,organizationalunit
} Like that.
On 01-Aug-2016 11:33 PM, "Yogesh cittu" <yogeshcittu@xxxxxxxxxxxxxxxx> wrote:
Hi, Can anyone share PowerShell Script for BULK computers to fetch their OU location details. I have a list of computers where their OU path differs. Eg:
computer1 is located as below
/General/test/lab computer2 is located as below
/local/script/test1 Please help me for the above requirement Thanks and Regards,
Yogesh

Close