Solved

Searching for a computer in Active Directory using powerShell

Posted on 2014-12-02
2
252 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

777 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