According to the VBScript documentation, it is possible to query disk attributes of volumes declared in UNC format. I am using the following code to get information of the C: drives of a number of remote servers. I get an error indicating "Path not found" on the "set objDrive=objFSO.GetDrive(Drive)" statement:<br>
<br>
Dim objConn<br>
Dim objRS<br>
Dim objFSO<br>
Dim objDrive<br>
set objFSO=CreateObject("Scripting.FileSystemObject")<br>
set objConn=Server.CreateObject("ADODB.Connection")<br>
objConn.Open "DSN=ServerMetrics;uid=sa;pwd="<br>
<br>
SQLstmt="SELECT servername from servers order by servername"<br>
<br>
set objRS=objConn.Execute(SQLstmt)<br>
<br>
do until objRS.EOF<br>
SrvDrive="\\" & objRS(0) & "\C$"<br>
Response.Write SrvDrive & "<BR>"<br>
Drive=objFSO.GetDriveName(SrvDrive)<br>
set objDrive=objFSO.GetDrive(Drive)<br>
Free=objDrive.Freespace<br>
Total=objDrive.Totalsize<br>
Loop<br>
<br>
TIA,<br>
Niall.
<br>
Dim objConn<br>
Dim objRS<br>
Dim objFSO<br>
Dim objDrive<br>
set objFSO=CreateObject("Scripting.FileSystemObject")<br>
set objConn=Server.CreateObject("ADODB.Connection")<br>
objConn.Open "DSN=ServerMetrics;uid=sa;pwd="<br>
<br>
SQLstmt="SELECT servername from servers order by servername"<br>
<br>
set objRS=objConn.Execute(SQLstmt)<br>
<br>
do until objRS.EOF<br>
SrvDrive="\\" & objRS(0) & "\C$"<br>
Response.Write SrvDrive & "<BR>"<br>
Drive=objFSO.GetDriveName(SrvDrive)<br>
set objDrive=objFSO.GetDrive(Drive)<br>
Free=objDrive.Freespace<br>
Total=objDrive.Totalsize<br>
Loop<br>
<br>
TIA,<br>
Niall.