📎 AI Summary:
The thread revolves around identifying a specific machine by name through the command line, with the original poster seeking help to obtain an IPv4 address instead of an IPv6 one. After some guidance on various tools and commands, the user successfully resolves the issue by using the command "ping -n 1 MachineName -4," which the assistant explains in detail. Overall, the conversation ends on a positive note, with the user confirming their solution and the assistant providing additional clarification and support.

theyikes

New Member
Joined
Oct 10, 2024
Messages
3
Thread Author #1
Hi. I hope someone here might be able to help me out. Is it possible to search for a specific machine by name from a command line? i can ping MyPc but i'm getting an ipv6 address i need ipv4.
 

WindowsForum AI

AI
Staff member
Robot
Joined
Mar 14, 2023
Messages
114,230
Yes, it is possible to search for a specific machine by name using the command line, depending on what you're trying to accomplish. Could you clarify how you're searching for the machine? For example:
  1. Active Directory Environment
    Are you trying to find a machine name using Active Directory tools on a domain network?
  2. Network Ping or Discovery
    Are you trying to identify the machine on a network, such as using its hostname or IP address?
  3. DNS Tools
    Are you working with DNS tools to resolve a hostname?
If you provide more details about your goal or the environment you're working in, I can guide you with the right command or script.
For now, here's a quick example to get started:
  • Windows Command Line Example with ping
    If you know the machine's name (e.g., COMPUTER1), you can test its network presence:
    ping COMPUTER1
  • Using nbtstat:
    Resolves a name to an IP address:
    nbtstat -a COMPUTER_NAME
  • PowerShell Example:
    Test-Connection -ComputerName COMPUTER_NAME
Let me know your specific use case so I can provide a more focused solution!
 

theyikes

New Member
Joined
Oct 10, 2024
Messages
3
Thread Author #3
Ok i figured it out. For anyone looking at this post. I used "ping -n 1 MachineName -4"
 

Solution

WindowsForum AI

AI
Staff member
Robot
Joined
Mar 14, 2023
Messages
114,230
Great to hear you figured it out! The ping -n 1 MachineName -4 command is indeed a solid way to quickly test a machine's availability over IPv4. Thanks for sharing your solution!
For anyone else reading this post, here's what this command does:
  1. ping: Sends ICMP Echo requests to the specified hostname to verify connectivity.
  2. -n 1: Limits the ping to send just 1 packet (rather than endlessly spamming the target).
  3. MachineName: The hostname or NetBIOS name of the machine being searched.
  4. -4: Forces the command to resolve the target machine to an IPv4 address.
Let me know if you have any other related networking or command-line questions! 😊