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

    • PornHub commits to age checks for UK users by 25 July by Paul Hill Ofcom, the UK’s digital regulator, has announced that PornHub and several other porn sites have agreed to put robust age checks in place by the deadline next month on 25 July. The confirmations to Ofcom will likely be used by the regulator against the companies if they fail to comply by the deadline as justification for a fine. The companies that have publicly stated they’re going to have safeguards in place by the deadline are PornHub, BoyfriendTV, Cam4, FrolicMe, inxxx, Jerkmate, LiveHDCams, MyDirtyHobby, RedTube, Streamate, Stripchat, Tube8, and YouPorn. There may be other companies that are preparing, these are just the ones that were happy to be named. Ofcom has been given the task of making sure porn sites comply with age check rules. If companies don’t follow the rules, Ofcom has the power to impose fines and even apply for a court order to ban websites or apps from being available in the UK. These rules are part of the wider Online Safety Act, which aims, in part, to keep children safe online. So far, it has launched investigations into four porn providers for failing to comply with its requests. Oliver Griffiths, Ofcom Group Director of Online Safety said: “Society has long protected youngsters from products that aren’t suitable for them, from alcohol to smoking or gambling. But for too long children have been only a click away from harmful pornography online. “Now, change is happening. These age checks will bring pornography into line with how we treat adult services in the real world, without compromising access and privacy for over-18s.” The new age verification methods come in various shapes and sizes (pun intended) including credit card checks, open banking, and facial age estimation. While these may not keep all kids from accessing porn, they’ll act as a significant hurdle. For adults concerned about handing over information to access porn sites, Ofcom said that the measures do not harm your privacy. All of the age assurance methods are subject to the requirements of UK privacy laws, including on processing personal data. The Information Commissioner’s Office (ICO) is overseeing this area to ensure companies comply. Ofcom’s own studies have found that 3% of 8-9 year-olds have been exposed to online pornography at some point. This highlights how easy it is to find this content and clearly something has to be done. It’ll be interesting to see how these measures actually play out when they get rolled out.
    • Looks like MS is officially extending Windows 10 support while stopping just short of officially changing the end date. I teased in the last article that the process for gaining free support was a little invasive, but this is basically just giving it out for free, so I guess I'm taking back those words.
    • Microsoft shares Windows 10 ESU key guide for office PCs that don't support Windows 11 by Sayan Sen Recently, the Indian government issued a caution about the upcoming end of support for Windows 10 which is about four months away. Interestingly, on that very day, Microsoft made a major announcement regarding this as the tech giant debuted free enrollment options wherein support would be extended for another year at no extra cost. Microsoft is also trying to make it easy to set up Extended Security Updates (ESU) with a new tool. You can see in the image below: New ESU enroll wizard Following that, today, the company has shared a new guide on how to activate ESU via Intune in the case of Windows 10 office PCs that are not supported on Windows 11. First up, Microsoft has reminded users of the prerequisites of Windows 10 ESU: The system needs to be on Windows 10 22H2 with KB5046613 (November 2024 Patch Tuesday) or newer. The device needs access to the network endpoints required for client activation. The process that is used for activation needs administrative privileges on the device. The guide contains several PowerShell scripts and are meant for IT admins and system admins. One of those is a validation script "Check-Win10ESUPrereq.ps1" that Microsoft has published to help "verify a device has the required version and patch level for Windows and it can communicate to the required network endpoints." Essentially, it checks if the aforementioned requirements are satisfied and can be used for troubleshooting against those prerequisites. After the "validation," Microsoft says there are two ways to proceed with the ESU key activation. First. it can be done by either Remediation through: Detection Script (Win10ESUActivation-detect.ps1) and Remediation Script (Win10ESUActivation-remediate.ps1). And second, by Win32 Application with Win32 Install Script (Win10ESU-install.ps1) and Win32 Detection Script (Win10ESU-detection.ps1). In the case of Remediations, Microsoft mentions "some licensing considerations" due to which "some smaller companies may not have that option." Finally, Microsoft has also shared some Activation IDs for manual verification via Slmgr VB script for obtaining volume activation information: Win10 ESU Year1: f520e45e-7413-4a34-a497-d2765967d094 Win10 ESU Year2: 1043add5-23b1-4afb-9a0f-64343c8f3f8d Win10 ESU Year3: 83d49986-add3-41d7-ba33-87c7bfb5c0fb You can check the full guide and the details here on Microsoft's official Tech Community website.
    • It blows me away how overpriced Synology is. $600+ for a 3+ year old SATA NAS with only gigabit networking!! Even for 2022 that is pretty low-end hardware. Yes, the Synology software is fantastic, but if we say this hardware is worth $300 max (and that is even giving a generous premium to the fact that it is made by a respected OEM), their software is NOT worth an additional $300, especially considering it is locked to the hardware it shipped on and you have to pay that premium again for your next device. Important correction to the specs table above. Saying Disk Capacity is 72TB and even going further to detail that is 4x18, strongly implies it comes with those disks, which it does not. I would rather see it say "Max Capacity: 72TB (disks not included)."
    • well again if w11 adoption its so high there's no reason why they try to explain us why is "better" to move to w11. If they are so right about their downgraded UI, why they add some of their UI elements back things like never combine and now small icons. Last time i check majority is still on 10 over 11 so yeah millions of users that did not upgrade to w11
  • Recent Achievements

    • Conversation Starter
      Kavin25 earned a badge
      Conversation Starter
    • One Month Later
      Leonard grant earned a badge
      One Month Later
    • Week One Done
      pcdoctorsnet earned a badge
      Week One Done
    • Rising Star
      Phillip0web went up a rank
      Rising Star
    • One Month Later
      Epaminombas earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      529
    2. 2
      ATLien_0
      207
    3. 3
      +FloatingFatMan
      169
    4. 4
      Michael Scrip
      149
    5. 5
      Steven P.
      123
  • Tell a friend

    Love Neowin? Tell a friend!