Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


More Scripting! Free Space On Server....

  • Please log in to reply
No replies to this topic

#1 jwinathome


  • Members
  • 1,360 posts
  • Gender:Male
  • Location:Atlanta, Georgia
  • Local time:12:01 PM

Posted 25 July 2007 - 10:42 AM

Hi there...I have a simple Script that shows the free disk space of various drives, it is:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
	& "{impersonationLevel=impersonate}!\\" _
	& strComputer & "\root\cimv2")
Set colDisks = objWMIService.ExecQuery _
	("Select * from Win32_LogicalDisk")
For Each objDisk in colDisks
	Wscript.Echo "DeviceID: " & objDisk.DeviceID	   
	Wscript.Echo "Free Disk Space: " _
		& objDisk.FreeSpace

What I need this to do is to check the space on various disks of all my servers (about a dozen), and have that exported to an excel file.

My question is this a good start to doing something like that, or am is this just not even close at all? lol.

Thank you kindly for any help.

Edited by jwinathome, 25 July 2007 - 10:42 AM.

BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users