troubleshooting Question

How can i get the object information of a list of servers from powershell

Avatar of Jason Yu
Jason YuFlag for United States of America asked on
Powershell
9 Comments2 Solutions101 ViewsLast Modified:
I have a list of over 20 servers need to know their current OU/location and move them to a new OU.

I already used the following command to collect these servers, but i don't know which command I need use to get their current object/OU information, can someone here help?

Thanks.

PS C:\Windows\system32> Get-ADComputer -Filter {Name -like "*host*"} | select Name

Name
----
DAL-OHOST-FS
MIA-OHOST-01
STA-OHOST-01
VCR-OHOST-01
BPDR-OHOST-01
MTY-OHOST-01
NVA-OHOST-01
PRI-OHOST-01
PRI-1D-SCHOSTAG
DUR-OHOST-01
HOU-OHOST-FS
SFO-OHOST-01
ATL-OHOST-01
WAL-OHOST-01
PHI-OHOST-01
BOS-OHOST-01
MTL-OHOST-01
DAL-OHOST-01
CAL-OHOST-01
HOU-OHOST-01
WDC-OHOST-01
MCL-OHOST-01
LOM-OHOST-01
CHI-OHOST-01
MEX-OHOST-01
MIN-OHOST-01
NA-EXCHHOST-01
GLN-OHOST-01
NYC-OHOST-01
LAX-OHOST-01
TOR-OHOST-01
BUR-OHOST-01
TDC-OHOST-01
POR-OHOST-01
DA3-OHOST-01
CBS-OHOST-01
PRI-1B-SCHOSTAG
ASKER CERTIFIED SOLUTION
Chris Dent
PowerShell Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2010

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 2 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros