Solved

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

Posted on 2015-02-11
5
347 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 33

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
Concerto Cloud Services, a provider of fully managed private, public and hybrid cloud solutions, announced today it was named to the 20 Coolest Cloud Infrastructure Vendors Of The 2017 Cloud  (http://www.concertocloud.com/about/in-the-news/2017/02/0…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

749 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