#68942 - 2002-08-09 05:36 PM
Re: Total space used on a system
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Mark,
Does - GetDiskSpace work for you?
Kent
|
|
Top
|
|
|
|
#68946 - 2002-08-09 06:27 PM
Re: Total space used on a system
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
there was a dirsize() udf.. but it parses every file, and will therefore take a long time...
|
|
Top
|
|
|
|
#68947 - 2002-08-09 06:29 PM
Re: Total space used on a system
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
ther is also chkdsk... but you can't run it remotely. You could schedule it and output to a logfile...
|
|
Top
|
|
|
|
#68949 - 2002-08-09 06:49 PM
Re: Total space used on a system
|
New Mexico Mark
Hey THIS is FUN
  
Registered: 2002-01-03
Posts: 223
Loc: Columbia, SC
|
Getting disk size and subtracting free space from it would work, but I'm even stuck there.
I may just go back to a WMI solution and manually check the systems that fail with WMI.
Here is some interesting MS code.
code:
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 "Compressed: " & vbTab & objDisk.Compressed Wscript.Echo "Description: " & vbTab & objDisk.Description Wscript.Echo "DeviceID: " & vbTab & objDisk.DeviceID Wscript.Echo "DriveType: " & vbTab & objDisk.DriveType Wscript.Echo "FileSystem: " & vbTab & objDisk.FileSystem Wscript.Echo "FreeSpace: " & vbTab & objDisk.FreeSpace Wscript.Echo "MediaType: " & vbTab & objDisk.MediaType Wscript.Echo "Name: " & vbTab & objDisk.Name Wscript.Echo "QuotasDisabled: " & vbTab & objDisk.QuotasDisabled Wscript.Echo "QuotasIncomplete: " & vbTab & objDisk.QuotasIncomplete Wscript.Echo "QuotasRebuilding: " & vbTab & objDisk.QuotasRebuilding Wscript.Echo "Size: " & vbTab & objDisk.Size Wscript.Echo "SupportsDiskQuotas: " & vbTab & _ objDisk.SupportsDiskQuotas Wscript.Echo "SupportsFileBasedCompression: " & vbTab & _ objDisk.SupportsFileBasedCompression Wscript.Echo "SystemName: " & vbTab & objDisk.SystemName Wscript.Echo "VolumeDirty: " & vbTab & objDisk.VolumeDirty Wscript.Echo "VolumeName: " & vbTab & objDisk.VolumeName Wscript.Echo "VolumeSerialNumber: " & vbTab & _ objDisk.VolumeSerialNumber Next
|
|
Top
|
|
|
|
#68950 - 2002-08-09 07:47 PM
Re: Total space used on a system
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
How about FileSystemObject:
code:
$objFSO = CreateObject("Scripting.FileSystemObject") $Drives = $objFSO.Drives For each $Drive in $Drives If $Drive.Drivetype=2 ? "Drive: " $Drive.Driveletter ? " Total Space: " $Drive.TotalSize ? " Free Space: " $Drive.FreeSpace ? Endif Next
|
|
Top
|
|
|
|
#68952 - 2002-08-10 05:09 AM
Re: Total space used on a system
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
NMM,
> Kent:
> GetDiskSpace returns free space... I need total space used. Thanks, though.
Yes.. If you got the (total size of the drive) - (free space) wouldn't that be what you are looking for?
Here is what we use to send to our admins.. It is batch and I am sure that it could be converted to Kix..
http://www.robvanderwoude.com/files/servers.txt
Instead of NET VIEW, we have it read (TYPE) from a list..
When complete, it e-mails us the .CSV file..
Thanks,
Kent
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 764 anonymous users online.
|
|
|