Solved

Searching for a computer in Active Directory using powerShell

Posted on 2014-12-02
2
256 Views
Last Modified: 2014-12-02
Hi,

I am looking into the use of powerShell in a Windows Server Active Directory.
 I am new to both, Active Directory and PowerShell. So, please don't assume that I know what I am doing.

All I need here is to be shown how to tweak the following statement to get the properties of a computer which I know exists in Active directory: The computer Name is 14115A.:

 Get-AdComputer -Filter { name -Like '*14115A*' } -Properties

Thank you

Adam
0
Comment
Question by:adamtrask
[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
2 Comments
 
LVL 40

Accepted Solution

by:
footech earned 500 total points
ID: 40476869
If the name is "14115A"
Both of the following will get the computer.
Get-AdComputer -Filter { name -eq '14115A' }
Get-AdComputer '14115A'

You don't need to use -like or the wildcard (*) unless you want to match variations of the name.  Both of those commands will just retrieve the default set of properties.  If you want other properties, specify them by name with the properties parameter
Get-AdComputer '14115A' -properties OperatingSystem,OperatingSystemServicePack
or use * to retrieve them all.
Get-AdComputer '14115A' -properties *
0
 

Author Closing Comment

by:adamtrask
ID: 40476891
That was very helpful. Thank you very much.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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