How to use the command systeminfo (with examples)
- Windows
- December 25, 2023
The systeminfo
command is used to display the operating system configuration of a local or remote machine. It provides information about the hardware, software, and other system settings.
Use case 1: Display system configuration for the local machine
Code:
systeminfo
Motivation: This use case is helpful when you want to quickly obtain detailed information about the configuration of the local machine.
Explanation: The command systeminfo
without any additional arguments displays the system configuration for the local machine. It gathers information about the computer name, operating system version, installed patches, system uptime, processor details, memory details, network card information, and much more.
Example output:
Host Name: MyComputer
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042
...
Use case 2: Display system configuration in a specified output format
Code:
systeminfo /fo table|list|csv
Motivation: Sometimes it can be useful to have the system configuration information in a specific output format, such as a table, list, or CSV (comma-separated values) format.
Explanation: The /fo
argument followed by the desired format (table
, list
, or csv
) allows you to specify the output format for the system configuration. By default, the format is set to table
.
Example output (table format):
Host Name: MyComputer
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042
...
Example output (list format):
Host Name: MyComputer
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042
...
Example output (CSV format):
"Host Name","OS Name","OS Version",...
"MyComputer","Microsoft Windows 10 Pro","10.0.19042 N/A Build 19042",...
Use case 3: Display system configuration for a remote machine
Code:
systeminfo /s remote_name /u username /p password
Motivation: This use case is useful when you need to gather system configuration information from a remote machine.
Explanation: The /s
argument followed by the remote machine name allows you to specify the remote machine for which you want to retrieve the system configuration. The /u
argument followed by the username and /p
argument followed by the password are used to provide the authentication credentials for accessing the remote machine.
Example output:
Host Name: RemoteComputer
OS Name: Microsoft Windows Server 2019 Standard
OS Version: 10.0.17763 N/A Build 17763
...
Use case 4: Display detailed usage information
Code:
systeminfo /?
Motivation: This use case is helpful when you want to explore the available command-line options and their usages.
Explanation: The /?
argument displays detailed usage information for the systeminfo
command. It provides a summary of command-line options, their descriptions, and how to use them.
Example output:
Displays operating system configuration for a local or remote machine.
SYSTEMINFO [/S system [/U username [/P [password]]]] [/FO format] [/NH]
/S system Specifies the remote system to connect to.
/U [domain\]user Specifies the user context under which
the command should execute.
...
Conclusion:
The systeminfo
command is a powerful tool for obtaining detailed system configuration information for both local and remote machines. It allows you to retrieve hardware, software, and operating system details in various output formats. Whether you need to troubleshoot a system issue or simply want to gather information, the systeminfo
command is a valuable resource.