This tip describes how to determine the current disk usage on remote machines running VShell for Windows. This benefits the system administrator who needs an easy way to monitor drive space on remote systems without physically visiting each machine.
Scanning disk usage uses the VRALib COM interface. The VRALib API allows scripting of SSH2 connections and can provide remote drive information through the FileSystemObject when connected to VShell 3.8 or newer. VRALib is included with the Windows versions of VShell and SecureCRT®.
VShell 3.8 or newer versions have added support for drive enumeration via the firstname.lastname@example.org SFTP extension. This allows VShell to return information about all drives on the remote system, including fixed drives, CD-ROM drives, removable drives, and network drives. The drive path and letter, drive type, file system type, total size, and free space can be determined for each of the drives.
The example Visual Basic script in the link below shows how to use VRALib to gather and report the disk usage for all fixed drives on a remote machine. The script takes optional command-line arguments for hostname, port, username, and password. Alternatively, the default connection parameters can be specified from within the script. The script will print the drive path, filesystem, total size, free space, and the calculated percentage of free space for all fixed drives on the remote system.
Example scan disk usage script: RemoteDiskUsage_vbs.txt
Please see the VShell for Windows or SecureCRT for Windows help files for more information about using VRALib.
Here you can control cookies using the checkboxes below. Some cookies are essential for the use of our website and cannot be disabled. Others provide a convenience to the user and, if disabled, may reduce the ease of use of our site. Finally, some cookies provide anonymous analytic tracking data that help us provide the user with a richer browsing experience. You can elect to disable these cookies as well.