- AccessChk: View effective permissions on files and folders - Thu, Apr 13 2023
- Read NTFS permissions: View read, write, and deny access information with AccessEnum - Wed, Mar 29 2023
- Kill Windows a process with Tskill and Taskkill - Mon, Mar 13 2023
PsInfo is a relatively small tool with only a few available options. To display the options, run psinfo /?.
Get local information
By default, PsInfo gets information from a local computer and does not require administrative rights to do so. To gather information from remote systems, administrative rights are required, which will be covered later in the post. To get information from a local computer, simply run psinfo from a command line.
PsInfo on 64-bit
On a 64-bit version of Windows, the values for physical memory and IE version are not displayed correctly. In my example, I have a VM with 8 GB of RAM and IE version 11. Unfortunately, PsInfo was last updated in 2016, and it is unclear whether this will ever be fixed.
Get installed applications
You can limit the output to only selected rows of information by using the full or partial name of the field. For example, to show only information about processors, use psinfo process, which will show all three rows related to processors. Unfortunately, an attempt to query different rows (such as psinfo process, kernel) ends up with an empty result.
To get a list of installed applications, add the -s option. This information is taken from the uninstall keys in the registry.
Get available disk space
If you want to get the available disk space, you can query the disk volume information by adding the -d parameter to the command. Only volumes with assigned drive letters are shown. Also, if you are using SUBST associations (assigning a drive letter to a folder), PsInfo will show the same statistics as the real volume. In the example below, I have a Z: drive mapped to C:\mymount.
Other disk information that is shown might be a mapped network drive (shown as type Remote). However, as network drive maps are done within the user context, PsInfo can only show mapped drives for the user running the tool. When querying drive information from remote computers, PsInfo runs under the SYSTEM context, so only drives mapped under the SYSTEM account are reported.
The option -h was used to show installed hotfixes; however, it is deprecated and no longer works in newer operating systems.
Use PsInfo on remote systems
All PsTools utilities support remote operations using a syntax that is consistent across the entire suite. Not all the utilities perform the operation the same way; there might be different requirements. PsInfo has the following system requirements for remote systems:
- Requires Admin$ share to be accessible
- Requires Remote Registry service
PsInfo also supports querying multiple computer names in one command. To query information from a remote system:
psinfo \\ws2022 or psinfo \\192.168.1.10
You can also query several servers at the same time. This can be accomplished in multiple ways. The first option is to use a comma-separated command, like this:
Another option is to create a text file with one server name per line, and then run this command:
The last option is to run psinfo \\*, which queries all servers found in the domain or workgroup.
Another common feature across PsTools is the use of alternate credentials on the remote system. As you may imagine, this is handy when you run the query from an account that does not have administrative permissions on the remote systems. The syntax is as follows:
Psinfo \\ws2022 -u LAB\Administrator -p Passw0rd
If you have a space in the username, simply use the "LAB\User Name" syntax. If you omit the -p, the tool will prompt for the password. All the utilities use the WNetAddConnection2 API, so passwords are not sent in clear text over the network.
Create CSV output
The last feature to mention today is CSV output. This is mainly useful when querying multiple computers at the same time. To create CSV output from a remote system, use the following:
psinfo \\ws2022,ws2016 -c
If you want to have a different delimiter, use the -t parameter followed by the desired character. To use the tab character, use \t.
To export the results to a CSV or TXT file directly, use the standard console redirection syntax:
Subscribe to 4sysops newsletter!
psinfo \\ws2022,ws2016 -c >> result.csv
In this post, you have learned how to use Sysinternals PsInfo to get information such as the available disk space and the installed applications on local and remote Windows systems. Unfortunately, the tool has not been updated for a while and does not report proper hardware information from 64-bit systems.