View Remote Servers' Drive Sizes Via Command Prompt?


Recommended Posts

I want to check on some drive sizes remotely via the command prompt of some NT4 servers. Anyone know the command? I'm experiencing major brain freeze this morning and can't think of any other tools to view them. I can't log into the O/S of any of them but I can use just about any O/S to connect remotely.

Thanks!

Did you try a search engine? There are hundreds of examples on scripts.

This one looks good - http://www.adminscripteditor.com/scriptlib...view.asp?id=425

Then there are many free and pay for apps.

I use a script that runs every day and appends the free disk space to a csv file. It will enumerate actual and mapped drives. It does mean that you will need to map the drives though. Or, at least a folder on each of those drives.

'VBScript to calculate free space on hard drives
'Data appended to a csv file
'Appended data is dated

On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLogFile = objFSO.OpenTextFile("c:\Drive space.csv", 8, True)
'Change path\filename to suite

strLF = Chr(13)
msgText=""
Set oFileSys = CreateObject("Scripting.FileSystemObject")
For each drvLoop in oFileSys.Drives
msgText = msgText & date & "," & drvLoop.DriveLetter & "," & round(drvLoop.FreeSpace / (1024 ^ 3),2) & vbCrLf

'Free space calculated as (1024 ^ x),y)
'For Gb x=3
'For Mb x=2
'For Kb x=1
'y=decimal places

Next 'drvLoop
objLogFile.Write msgText
objLogFile.Close

'End of script

Yes I did search but only came up with results for software. Anyway, your comment about mapping drives gave me the idea to just map the c$, d$ and e$ drives I need to check and just do a "dir" in a command prompt window. Gave me the info I needed.

Thanks! ;)

Thanks for the script site too!

  Odom said:
Just go to any explorer Window or My Computer, the details will be in the task pane
:rofl: You really have to wonder what part of

"want to check on some drive sizes remotely via the command prompt"

did you not get?? ;)

I would suggest the psinfo tool from sysinternals (now MS) with the -d flag

C:\>psinfo -?

PsInfo v1.73 - Local and remote system information viewer

Copyright ? 2001-2005 Mark Russinovich

Sysinternals - www.sysinternals.com

PsInfo returns information about a local or remote Windows NT/2000/XP system.

Usage: psinfo [-h] [-s] [-d] [-c [-t delimiter]] [filter] [\\computer[,computer[,..]]|@file [-u Username [-p Password]]]

-u Specifies optional user name for login to

remote computer.

-p Specifies password for user name.

-h Show installed hotfixes.

-s Show installed software.

-d Show disk volume information.>

example;

Volume Type Format Label Size Free Free

A: Removable 0.0%

C: Fixed NTFS system 74.54 GB 15.22 GB 20.4%

  Hambone said:
Yes I did search but only came up with results for software.

There is no "built-in" command. If you want to use the command line:

  Quote
Command Line Tools

Freeware scriptable command line network connectivity tools

T4eDirSize

Gets the free and used space of any directory or share, also counts the number of special files (encrypted, readonly, hidden, system, etc); great for monitoring free space and file statistics. You can use this command line utility to enable share monitoring in MonitorMagic. It greatly extends the standard Disk Monitor by adding details on file attributes, file count and size information. You can also use this tool to retrieve disk performance information when counting all files, thereby projecting the necessity for disk defragmentation.

Source: http://www.tools4ever.com/products/free/command/

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I was a little disappointed with mine compared to the Lemokey P1, for example. Seemed cheap compared to all aluminum. But I liked the look to go with my Fractal North. Ended up getting a Keychron Q1 HE and a Lemokey L5 HE. Love the L5, which replaced my P1. The definitely aren't light boards.
    • Thunderbird 139.0.2 by Razvan Serea Thunderbird is a free, open-source, cross-platform application for managing email and news feeds. It is a local (rather than a web-based) email application that is powerful yet easy-to-use. Thunderbird is clean and elegant by default, but easily customizable to match your workflow and visual preferences. It is loaded with unique and powerful features. Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. Thunderbird gives you control and ownership over your email. There are lots of add-ons available for Thunderbird that enable you to extend and customize your email experience. Thunderbird gives you IMAP/POP support, a built-in RSS reader, support for HTML mail, powerful quick search, saved search folders, advanced message filtering, message grouping, labels, return receipts, smart address book LDAP address completion, import tools, and the ability to manage multiple e-mail and newsgroup accounts. Thunderbird 139.0.2 fixes: Security fixes Download: Thunderbird 139.0.2 for Windows (EN/US) | 32-bit | ~70.0 MB (Open Source) Download: Thunderbird 139.0.2 for Linux (EN/US) | 74.7 MB Download: Thunderbird 139.0.2 for Mac OS (EN/US) | 127.0 MB Download: Thunderbird 139.0.2 in other languages View: Thunderbird Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Thanks Nik and thanks Mind. Nik: Just on the off chance, you don't know where I could get this part at cheaper than normal price do you? I tried I few places but the I can find it at is 70GBP? Just gonna have to suck it up and buy the add-on for my PC. Thank you guys.
    • Underwhelming update. Same as 12,13,14,15. Then M3E ain't showing up until Q3
  • Recent Achievements

    • Week One Done
      elsa777 earned a badge
      Week One Done
    • One Month Later
      elsa777 earned a badge
      One Month Later
    • First Post
      K Dorman earned a badge
      First Post
    • Reacting Well
      rshit earned a badge
      Reacting Well
    • Reacting Well
      Alan- earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      544
    2. 2
      ATLien_0
      272
    3. 3
      +FloatingFatMan
      207
    4. 4
      +Edouard
      201
    5. 5
      snowy owl
      139
  • Tell a friend

    Love Neowin? Tell a friend!