Windows Command System Information

Active1 year, 6 months ago

Is there a built-in command line tool that will do reverse DNS look-ups in Windows? I.e., something like <toolname> w.x.y.z => mycomputername

I've tried:

We can find system information of a computer from windows command line using the command Systeminfo. This command shows the following details.Computer name, OS version, OS configuration, OS type, Install Date, System uptime data, BIOS version, Available physical memory, Processor model, Hotfixes installed, Network card. Windows Management Instrumentation (WMI) consists of a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification.

Market System Economics

  1. Windows has command line utilities that show us the version of the Windows OS running on the computer, including the service pack number. There are multiple CMD commands that help with finding this, you can pick the one that suits your need.
  2. Nov 07, 2017  The System Information provides a quick way get information about your system, but how you open it depends on what version of Windows you’re using. Here’s how to do it. Windows 7 or 10: Use the Start Menu. If you’re using Windows 7 or 10, hit Start, type “system information” into the search box, and then select the result.
  • nslookup: seems to be forward look-up only.
  • host: doesn't exist
  • dig: also doesn't exist.

I found 'What's the reverse DNS command line utility?' via a search, but this is specifically looking for a *nix utility, not a Windows one.

Community
alastairsalastairs
1,3502 gold badges11 silver badges11 bronze badges

Windows Command System Information

12 Answers

Should resolve the name from the IP address if the reverse lookup zone has been set up properly. If the reverse lookup zone does not have an entry for the record, the -a will just ping without a name.

chicks
3,1207 gold badges20 silver badges33 bronze badges
PeterPeter
4,8901 gold badge22 silver badges30 bronze badges

Does what you're looking for. It will tell you the server you're querying and the result.

For example:

Mark TurnerMark Turner
2,2241 gold badge13 silver badges16 bronze badges

The trouble with 'ping' is that it's not strictly a name server lookup tool (like nslookup) - for instance if you ping a hostname, it can be resolved to an IP address by a number of methods: DNS lookup, host file lookup, WINS (god forbid) or NetBIOS broadcast. It can also return a potentially out-dated cached result.

The order in which the methods are tried, depends on the clients' TCP/IP configuration and node type flag:

  • B-node (1): Broadcast
  • P-node (2): Peer (WINS only)
  • M-node (4): Mixed (broadcast, then WINS)
  • H-node (8): Hybrid (WINS, then broadcast)

To see the node type of the current computer:

If the resolution method is of no concern, use

or

as you please. If you need to be sure you're querying your DNS server for the correct name, use nslookup.

See also

  • Microsoft: TCP/IP and NBT configuration parameters for Windows XP (search for 'NodeType')
abstraskabstrask

Use NSLOOKUP with the '-type=ptr' parameter to query the IP address, syntax:

Then the 'in-addr.arpa' entry is also printed (even when not found), for example:

Compared to the lower fidelity response when using NSLOOKUP on an IP address without the type parameter:

M AguilarM Aguilar

nslookup will do reverse DNS on windows just as it can do it on linux.

Of course, there isn't a reverse entry for every ip address

theotherreceivetheotherreceive
7,7171 gold badge26 silver badges43 bronze badges
ko-dosko-dos

You can use the standard NSLOOKUP command:

In order to get a result there has to be a PTR record registered for the IP address in question.

splattnesplattne
25.9k19 gold badges92 silver badges144 bronze badges
Evan AndersonEvan Anderson
137k15 gold badges178 silver badges316 bronze badges

9 answers and no one said how to reverse lookup with dig? Its the best

dig -x w.x.y.z

Also, you can add '+short' for use in bash loops, scripts, etc.... forward or reverse :)

nandoPnandoP

Under Windows....

Standard ping does NOT return host name of IP address

Windows Cmd Get System Information

NSLookup can be used to find this info, if DNS is setup properly

Procedure as follows:

Open DOS prompt

NSLookup

set type=ptr

a.b.c.d

Results will be shown with reverse DNS server address, and host name

HopelessN00bWindows Command System Information
49k25 gold badges121 silver badges194 bronze badges
Ivo van SelstIvo van Selst

There is yet another way. Reverse the IP address and use nslookup

to resolve the address 1.2.3.4

sweetfasweetfa

If nslookup, dig, host does not exists, try this:

Works e.g. on docker AWS ec2 instances (which really don't have anything installed)

Open Command Prompt

FelixFelix

Not the answer you're looking for? Browse other questions tagged windowsdomain-name-systemipcommand-line-interfacereverse-dns or ask your own question.

When you begin to notice random errors, issues during boot or Windows components are not working as they should on your computer there is a good chance that one or more system files may have gone missing or corrupted.

Even though Windows 10 does a good job protecting files that are necessary for your PC to work correctly, applications, drivers, or even Windows Update may sometimes be the cause of system instability. Like in previous versions, for these situations, Windows 10 includes the System File Checker (SFC), a tiny but powerful command-line utility that can scan the integrity and replace any corrupted or missing protected system file with a known good version.

In this guide, we'll walk you through the steps to use System File Checker (SFC) to repair any damaged system file automatically while you're running the operating system, offline using Advanced startup, and manually when SFC is unable to fix the problem.

Before you begin, it's important to note that you'll be making changes to your system, as such it's recommended to do a full backup or create a system restore point in case things go wrong, and you need to roll back.

How to scan and repair system files on Windows 10

The following command will do a full scan of the protected system files on your computer and fix any file that are causing issues while Windows 10 is up and running.

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (Admin), as you will need administrator permissions to run SFC.
  2. In the Command Prompt type the following command and press Enter:

    sfc /scannow

  3. Once the scan completes, you will see one of the following messages:

    • Windows Resource Protection did not find any integrity violations: This indicates that your system doesn't have any missing or corrupted files.
    • Windows Resource Protection could not perform the requested operation: This message means that there was a problem during the scan and an offline scan is required.
    • Windows Resource Protection found corrupt files and successfully repaired them. Details are included in the CBS.Log %WinDir%LogsCBSCBS.log: You will get this message when SFC was able to fix the problem. Now, you can move on or you can view the logs to get more details.
    • Windows Resource Protection found corrupt files but was unable to fix some of them. Details are included in the CBS.Log %WinDir%LogsCBSCBS.log: In this case, you'll need to repair the corrupted files manually.

Quick Tip: You may want to run the command around three times to fix all the problems.

How to view the details of an SFC scan

To see the details of a System File Checker stored in the CBS.Log file, you'll need to make a readable copy on your desktop:

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt.
  2. Type the following command and press Enter:

    findstr /c:'[SR]' %windir%LogsCBSCBS.log >'%userprofile%Desktopsfclogs.txt'

  3. Open the sfclogs.txt located on the desktop with Notepad. The file will contain all the details of the scanned system files and information for files that couldn't be repaired.

Note: Details for SFC scans are only available when you do a scan within Windows, not when you do an offline scan on Command Prompt.

How to scan and repair system files on Windows 10 offline

Sometimes protected system files that need to be repaired are loaded in memory while Windows 10 is running. If this is the case, you can run SFC offline to fix your computer.

Windows Command System Info

  1. Use the Windows key + I keyboard shortcut to open the Settings app.
  2. Click Update & security.
  3. Click Recovery.
  4. Under Advanced startup, click Restart now.

  5. Click Troubleshoot.
  6. Click Advanced options.
  7. Click Command Prompt to boot your computer only with Command Prompt.

  8. On reboot, you'll be prompted to enter your username and password to continue.
  9. Whenever you need to run SCF outside of Windows, you need to tell the utility exactly where the Windows installation files are. On Command Prompt, type the following command to understand the location of the Windows and System Reserved partitions.

    wmic logicaldisk get deviceid, volumename, description

  10. Type the following command, and press Enter:

    sfc /scannow /offbootdir=C: /offwindir=D:Windows

    Note: We're using the /offboodir switch to specify the drive letter of the System Reserved partition, which in this case is C, and the /offwindir switch specifies the location of the Windows files, which in this case is D:Windows.

    Keep in mind that when you boot your computer with Command Prompt, the drive letters may be different, which is why you need to use the command on step 9. However, most of the time, when working with Windows 10, D: is usually the drive letter for the installation and C: is the letter for the System Reserved partition.

  11. Once the scan is complete, close Command Prompt.

  12. Click Continue to exit and go back to Windows 10.

How to repair system files manually on Windows 10

Economic Mixed System

If the System File Checker couldn't fix one or more files, you will need to repair them manually.

Open the sfclogs.txt file to determine which are the corrupted files, find where they belong by doing a simple file search or use your preferred Internet search engine to get more details. Then follow the instructions below to replace the corrupted file.

Quick Tip: You can find known good system file copies on another computer running the same version of the operating system like the one running on your PC.

Windows Command For System Information

  1. Use the Windows key + X keyboard shortcut to open the Power User menu and select Command Prompt (Admin).
  2. Take ownership of the corrupted system file. In the Command Prompt type the following command, and press Enter:

    takeown /f C:Path-and-File-Name

    Note: Replace C:Path-and-File-Name with the path and name of the corrupted file. For example, C:WindowsSystem32appraiser.dll.

  3. Allow full admin access to the corrupted file using the following command and press Enter:

    icacls C:Path-and-File-Name /Grant Administrators:F

  4. Replace the file in question with a good copy using the following command and press Enter:

    copy C:Path-SOURCE-and-File-Name C:Path-DESTINATION-and-File-Name

    Note: You need to replace C:Path-SOURCE-and-File-Name with the source path and file name of the known good file, and you also need to replace C:Path-DESTINATION-and-File-Name with the destination path and name of the damaged file. Here's an example: copy D:Filesappraiser.dll C:WindowsSystem32appraiser.dll.

  5. Type Yes and press Enter to confirm the overwrite.

After replacing the file, you can type SFC /verifyonly command and press Enter in Command Prompt to verify the integrity of all the system files to see if the problem has been fixed. Alternatively, if you repaired only a few files, you can test the integrity of each file by using the sfc /VERIFYFILE=C:Path-and-File-Name command (e.g., sfc /VERIFYFILE=C:WindowsSystem32kernel32.dll).

Keep in mind that you're not limited to use this utility on Windows 10, SFC is a command-line tool available on previous versions of the operating system. However, you may find different features depending on the version you're running. In Command Prompt (Admin) use the sfc /? command to list the features available to you.

More on Windows 10

For more tips, coverage, and answers on Windows 10, you can visit the following resources: