VanDyke Software



Scan disk usage on a remote machine using VShell® for Windows and VRALib

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 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.

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.