It doesn't seem to like the "dim lTotalSize as long", I commented it out and it ran, however the total is concatenating the totals from each computer. Using spaces in the script for the host's also causes it to reuse the first host:
Caption: C:
Size_1: 32201936896
Size: 30 GB
Serial: E85B1B6A
Caption: C:
Size_1: 32201936896
Size: 30 GB
Serial: E85B1B6A
Total size = 3220193689632201936896
===========Without spaces===========
C:\scripto>cscript test.vbs /s:10.1.1.120,10.1.1.60,10
Using alternate credentials...
Caption: C:
Size_1: 32201936896
Size: 30 GB
Serial: E85B1B6A
Caption: C:
Size_1: 79990812672
Size: 74.5 GB
Serial: B40E65D6
Caption: C:
Size_1: 39997927424
Size: 37.3 GB
Serial: BEBC616A
Caption: D:
Size_1: 39998976000
Size: 37.3 GB
Serial: B6395BFA
Total size = 32201936896799908126723999
I've managed to get the addition to work with the code below, however I'm sure it's bad form or hacky. I don't know vbs that well so this actually took me a long time :)
Main Topics
Browse All Topics





by: purplepomegranitePosted on 2009-10-20 at 01:15:48ID: 25611863
The below should do what you want. It trims any whitespace from the input parameter (meaning it doesn't matter how many spaces surround the commas anymore), and keeps a running total of the size.
Select allOpen in new window