Thanx all for the help. Got the last lines working with benny's suggestion. Learned something today about VB, and COM scripting 
This is what I ended up with. I'll be tweaking it a bit if needed in the following days.
Tested this on Windows 2000 server SP4 with Exchange SP3 from a Windows XP SP2 client. Admin privileges should not be needed as long as the mailbox to use belongs to the account the script runs on.
Code:
;This script logs on to a server that is running Exchange Server.
;It displays the current number of bytes that are used in the user's mailbox and the number of messages.
;This requires that CDO 1.21 is installed on the computer.
;
Dim $oSession, $oInfoStores, $oInfoStore, $StorageUsed, $NumMessages, $strProfileInfo, $sMsg, $server, $mailbox
;
;Set mail server mailbox to query.
$server = "put your mail server here"
$mailbox = "put the mailbox to query here"
;
;Check if the server and mailbox are not empty.
If $server = ""
?"Please specify a server."
Sleep 5
Exit
Else
If $mailbox = ""
?"Please specify a mailbox."
Sleep 5
Exit
EndIf
EndIf
;
;Create Session object.
$oSession = CreateObject("MAPI.Session")
If @ERROR
$sMsg = "Error creating MAPI.Session."
$sMsg = $sMsg + "Make sure CDO 1.21 is installed. "
$sMsg = $sMsg + @ERROR + " " + @SERROR
?$sMsg
Exit @ERROR
EndIf
;
;Set the login string.
$vbLf = Chr(10)
$strProfileInfo = $server + $vbLf + $mailbox
;
;Log on to the server.
$oSession.Logon(,,0,1,,1,$strProfileInfo)
If @ERROR
$sMsg = "Error logging on: "
$sMsg = $sMsg +@ERROR + " " + @SERROR
?$sMsg
?"Server: " $server
?"Mailbox: " $mailbox
$oSession = 0
Exit @ERROR
EndIf
;
;Grab the information stores.
$oInfoStores = $oSession.InfoStores
If @ERROR
$sMsg = "Error retrieving InfoStores Collection: "
$sMsg = $sMsg + @ERROR + " " + @SERROR
?$sMsg
?"Server: " + $server
?"Mailbox: " + $mailbox
$oInfoStores = 0
$oSession = 0
Exit @ERROR
EndIf
;
;Loop through information stores to find the user's mailbox.
For Each $oInfoStore in $oInfoStores
If InStr($oInfoStore.Name, "Mailbox - ")
;
;Get the amount of space ussed by the mailbox.
$StorageUsed = $oInfoStore.Fields(&E080003)
If @ERROR
$sMsg = "Error retrieving PR_MESSAGE_SIZE: "
$sMsg = $sMsg + @ERROR " " + @SERROR
?$sMsg
?"Server: " + $server
?"Mailbox: " $mailbox
$oInfoStore = 0
$oInfoStores = 0
$oSession = 0
Exit @ERROR
EndIf
;
;Get the number of messages in the mailbox.
$NumMessages = $oInfoStore.Fields(&36020003)
If@ERROR
$sMsg = "Error Retrieving PR_CONTENT_COUNT: "
$sMsg = $sMsg +@ERROR + " " + @SERROR
?"Server: " $server
?"Mailbox: " $mailbox
$oInfoStore = 0
$oInfoStores = 0
$oSession = 0
Exit @ERROR
EndIf
;
;Display the results.
$sMsg = "Storage Used in " + $oInfoStore.Name
$sMsg = $sMsg + " (bytes): " + $StorageUsed
?$sMsg
?"Number of Messages: " + $NumMessages
Sleep 5
EndIf
Next
;
;Log off.
$rc = $oSession.LogOff
;
;Clean up memory.
$oInfoStore = 0
$oInfoStores = 0
$oSession = 0
[edit]
Removed a typo.
[/edit]