Solved

Searching for a computer in Active Directory using powerShell

Posted on 2014-12-02
2
248 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
2 Comments
 
LVL 39

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
"Migrate" an SMTP relay receive connector to a new server using info from an old server.
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

911 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now