Find a server in AD with only part of its name

Posted on 2014-07-17
Last Modified: 2014-07-29
Hi all,
can't remember the query to run in order to find all servers using only part of the name. We know it has "hyp" in the name but not the rest. Does anyone know?
Question by:Jason Thomas
    LVL 19

    Accepted Solution

    On Users and computers of Active directory is (&(objectCategory=computer)(name=hyp*) if starts with hyp. You can try with name=*hyp*

    Assisted Solution


    You can try this
    Get-ADComputer -Filter 'SamAccountName -like "hyp*"' | Select -Exp Name

    LVL 1

    Author Comment

    by:Jason Thomas
    I'll try thanks .  @ Miguel , I'm not sure what you mean or how I apply what you are saying?
    LVL 34

    Expert Comment

    Try below on DC

    dsquery computer -o rdn -limit 0 > C:\Computerlist.txt

    Open in new window

    LVL 1

    Author Comment

    by:Jason Thomas
    Hi lahesh. Where in the command are we specifying part of the name? Won't your command display all names in AD?
    LVL 34

    Expert Comment

    -o rdn will export the all computers netbios name in active directory
    The command has to be run on domain controller from elevated command prompt

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Using a software based iSCSI solution, there is no requirement to purchase a hardware iSCSI initiator or TOE (TCP/IP Offload Engine) interface card. A standard network interface card can be used to connect an existing ESXi server to a remote iSCSI t…
    The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
    This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
    This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

    779 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

    13 Experts available now in Live!

    Get 1:1 Help Now