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

    • Xbox June Update brings unsynced save management, publisher browsing, and more by Pulasthi Ariyasinghe June has been a busy month for Microsoft, bringing major software upgrades across its product stack. It even announced new hardware for its Xbox lineup, finally entering the handheld gaming space. The company's roundup for this month's new features has now been published, and it's touting a great deal of changes. To start off on the PC side, the Xbox app on the platform now has a section to browse by publishers. The company says that this will let players easily discover more games made by their favorite developers and franchises. Copilot for Gaming also landed in beta form recently, letting users ask AI for help when a game gets too difficult. It's only available for iOS and Android for now, with ROG Xbox Ally support coming later this year. Another feature that will hit the Xbox Ally is the new universal launcher feature for the Xbox app on PC. Microsoft just kicked off Xbox Insider testing for this functionality earlier today. Get all the details here. Over on consoles, the ability to hide system apps, pin favorites to the list, and reduce the number of tiles displayed are now available. Game Hubs also arrived as a fresh feature to easily display relevant information when selecting a game to play, offering data on player stats, achievements, friends currently playing, recent captures, available add-ons, events, and more. Double-tapping the play button will quick-launch the game instead. On both Xbox consoles and in the cloud, a new progress bar will now appear when a save has been left behind on a device in an offline state. "A new progress bar, device names, timestamps, and additional details are now displayed when you have previous game saves on another device in an unsynced state," says the company. Microsoft has also added mouse and keyboard controls as well as touch controls for more cloud games this month. These join the fresh additions that have landed on the 'Stream your own game' collection and the Retro Classics app. Check out the full lists on the announcement page here. On top of all this, Microsoft has also announced that Xbox will be at Gamescom this year. While no details have been announced yet, more announcements from Xbox Game Studios may happen at the major gaming event.
    • Hopefully this is a precurser to them linking other launchers to the Xbox console. With this current gen the Xbox has had dismal sales compared to the competition. If they did support Steam, Epic, Ubisoft Connect, etc etc they'd crush on the next gen battle.
    • My update. Didn't see much point in the top panel since global menu isn't there, so going with a win/kde layout now. Overall, I would say Gnome is a disappointment - it's been 15 years and you still have to rely on a bunch of extensions to get anything useful out of it. At the same time, the way Universal Blue / Bluefin is approaching the desktop feels like what Ubuntu should have started doing five years ago (no wonder the guy I learned about this from used to work for Canonical). Maybe I should have gone with Aurora (the KDE variant), or Bazzite with KDE, but I think I have Gnome where it works for me now.       
    • GOG Galaxy offers connecting of other launchers into theirs. And while idea is interesting, I always had issues with Steam that would just lose connection and just not work. Which was annoying.
    • I remember that during the earlier development of Windows 10 a big deal was made about the Recycle Bin icon(s). https://www.neowin.net/news/wi...pdated-icons-in-this-build/
  • Recent Achievements

    • Dedicated
      Camlann earned a badge
      Dedicated
    • Week One Done
      fredss earned a badge
      Week One Done
    • Dedicated
      fabioc earned a badge
      Dedicated
    • One Month Later
      GoForma earned a badge
      One Month Later
    • Week One Done
      GoForma earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      647
    2. 2
      Michael Scrip
      226
    3. 3
      ATLien_0
      221
    4. 4
      +FloatingFatMan
      143
    5. 5
      Xenon
      136
  • Tell a friend

    Love Neowin? Tell a friend!