• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 117
  • Last Modified:

Set Employee type attribute on computer objects

Hi EE

Can someone please help me with a script that will do the following.

Get computer object names from a list
Update the EmployeeType to X123 on the computer objects
Export a csv showing the EmployeeType value after the change.
0
MilesLogan
Asked:
MilesLogan
  • 2
1 Solution
 
oBdACommented:
Get-Content -Path "C:\Temp\test.txt" | Set-ADComputer -Replace @{"employeeType"="X123"} -PassThru | Get-ADComputer -Property employeeType | Select-Object -Property Name, employeeType | Export-Csv -NoTypeInformation -Path C:\Temp\test2.csv

Open in new window

0
 
MilesLoganAuthor Commented:
Thanks oBdA ... this worked perfect .. I opened a new question to add a bit to this..

http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28667455.html
0
 
MilesLoganAuthor Commented:
Thank you for the quick response .
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now