?
Solved

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

Posted on 2015-02-11
5
Medium Priority
?
534 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 2000 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 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

764 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