Solved

Script to export "managedBy" attribute for all Computers in AD

Posted on 2015-02-11
5
413 Views
Last Modified: 2015-02-11
Hi, kindly assist to have script (VBS or Powershell) to export below informations on computer objects within a Active Directory OU.

Computer name
Operating System
Operating System Version
Service Pack
managedBy
Date of Creation
0
Comment
Question by:TJOSY
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 40604046
pretty straightforward use the below script.
Import-module activedirectory
Get-ADComputer -Filter * -Properties name, operatingsystem, operatingsystemversion, OperatingSystemServicePack, managedby, whenCreated | select name, operatingsystem, operatingsystemversion, OperatingSystemServicePack, managedby, whenCreated | Export-csv "c:\ComputerSpecs.csv" -notypeinformation

Open in new window



Will.
0
 
LVL 34

Expert Comment

by:it_saige
ID: 40604077
Will is just on it today.  I swear this is the 80th question I have opened today with him being the first responder.  ;)

-saige-
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 40604082
Will is just on it today.  I swear this is the 80th question I have opened today with him being the first responder.

Slow day at the office ROFL!

Will.
0
 

Author Comment

by:TJOSY
ID: 40604091
Thank you Will.. question: can I have this script customized for a specific Active Directory OU
0
 
LVL 53

Assisted Solution

by:Will Szymkowski
Will Szymkowski earned 500 total points
ID: 40604874
Sure use the following command below...

Import-module activedirectory
Get-ADComputer -Filter * -searchbase "ou=myou,dc=domain,dc=com" -Properties name, operatingsystem, operatingsystemversion, OperatingSystemServicePack, managedby, whenCreated | select name, operatingsystem, operatingsystemversion, OperatingSystemServicePack, managedby, whenCreated | Export-csv "c:\ComputerSpecs.csv" -notypeinformation

Open in new window


Change -searchbase "ou=myou,dc=domain,dc=com" to the OU in your domain environment.

Will.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Configuring Remote Assistance for use with SCCM
Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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