Solved

Searching for a computer in Active Directory using powerShell

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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 …
A procedure for exporting installed hotfix details of remote computers using powershell
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…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

705 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

20 Experts available now in Live!

Get 1:1 Help Now