![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Script producing ""Not enough storage is available to complete..." My vbscript is producing the error ""Not enough storage is available to complete this operation" when it connects to another server in the same domain to enumerate disks and check free disk space. The subroutine (incuded below) works for other servers, but not the same 2 every time it runs. How do I troubleshoot/fix this? Sub DisplayExchangeKVSBladesFreeSpace(strServerName) Const HARD_DISK = 3 Dim objWMIService, colDisks, objDisk Dim ActualFreeSpaceGb on error resume next Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strServerName & "\root\cimv2") Set colDisks = objWMIService.ExecQuery ("Select * from Win32_LogicalDisk Where DriveType = " & HARD_DISK & "") wscript.echo " Free disk space on " & ucase(strServerName) wscript.echo wscript.echo " Minimum" wscript.echo "Drive Free space allowed" wscript.echo "-------------------------------" For Each objDisk In colDisks strWarning = "" ActualFreeSpaceGb = objDisk.FreeSpace/1073741824 wscript.echo objDisk.DeviceID & vbtab & formatnumber(ActualFreeSpaceGb,2,,,-2) & " Gb" & space(16-len(formatnumber(ActualFreeSpaceGb,2,,,-2) & " Gb")) Next End Sub Thanks for any help. Iain |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| do not display "ERRORS" when running script without using $erroractionpreference = "SilentlyContinue" | PowerShell | |||
| Texas Instruments PCI GemCore based SmartCard controller producing"page_fault_in_non_paged_area" | Vista hardware & devices | |||
| Deleted "Outbox" from "Storage folders", reappears as seperate item | Live Mail | |||
| Vista not wotking with "My Computer" or "Control Panel", "Screen Saver" | Vista General | |||
| Should "script" be listed as a "reserved word" | PowerShell | |||