Kaseya Community

Is anyone using the Exchange Mailbox Size script from Kaseya?

  • Specifically, the "mailboxsize.vbs" script that is used by the Kaseya script?

    If I double-click on this file from Windows Explorer right on my Exchange Server, the resulting mailboxsize.txt file appears in the same folder as the vbs file, with the data that I expect.

    But when I try to execute the file through a script, it "tries" to create a mailboxsize.txt in the C:\Windows\System32 folder. And it only puts the header in that file, never the details.

    I must be missing something.

    Thanks in advance.


    Legacy Forum Name: Is anyone using the Exchange Mailbox Size script from Kaseya?,
    Legacy Posted By Username: vplaza
  • hey, did you ever find the script...? I canont seem to locate it. I saw reference to sourceminers website as a source, but it seems to no longer be up.

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • I have the zip file with all the files in it. I can email to you.

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: vplaza
  • Much mana to billmccl for showing me the way on how to get this to work. I had thought that I had tried all combinations of the "Execute" commands to get the vb script to run, but apparently, I had not.

    Thanks again, Bill.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: vplaza
  • Can you email me the zip file...? I would love to have a look at it. Just PM me.

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • This script still doesn't really work. When I run it via Kaseya script management, the script executes on the remote machine but the resulting .txt file only contains the header information.

    If I run the script from the local console as Administrator, it creates the .txt file I'm looking for.

    I've tried executing this script both as "User" and "System" from the Kaseya script management, both with the same effect. Any comments?


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: BulletproofSean
  • Sorry, I left out a minor detail. Bill also had to modify the .vbs file. Turns out there seems to be a rights issue. So, he changed the (".MailboxSize.txt", True) to ("C:tempMailboxSize.txt", 2, True). This seems to get it to work.

    I'll check and see if it really worked for me or not....


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: vplaza
  • just my 2 cents... I got the script vplaza sent me to work. It may be a permissions issue though. I have only run it on a couple of machines that have exchange server on it.

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • also, I am not an exchange guru, but is ther not a section on the exchange server where you can get most of this data emailed to you already...? I showed this script to a guy just the other day, and the very first thing he said was, "Hey, you know Exchange server has that built into it right?" I am not an exchange expert... so I reserve comment to someone who knows what they are talking about.

    Gamer-X


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: Gamer-X
  • vplaza wrote:
    Sorry, I left out a minor detail. Bill also had to modify the .vbs file. Turns out there seems to be a rights issue. So, he changed the (".MailboxSize.txt", True) to ("C:tempMailboxSize.txt", 2, True). This seems to get it to work.

    I'll check and see if it really worked for me or not....


    I had already figured that out. When you run the script unattended before, it would write the log file to %systemroo%\system32.

    Anyway, I'm still having the same problem. Double click the .vbs as Admin and it works like a champ. Run unattended as "System" (as per Kaseya), and it only spits out the header, which tells me that its probably being denied access to the info it needs.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: BulletproofSean
  • Gamer-X wrote:
    also, I am not an exchange guru, but is ther not a section on the exchange server where you can get most of this data emailed to you already...? I showed this script to a guy just the other day, and the very first thing he said was, "Hey, you know Exchange server has that built into it right?" I am not an exchange expert... so I reserve comment to someone who knows what they are talking about.

    Gamer-X

    Yeah probably. In the end I just decided to scrap this script altogether. Its just that I manage many many clients over teh Intarweb and figured if I could get this with a canned script into my Kaseya log then great. IfI _really_ need the info, I'll write something to grab it.

    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: BulletproofSean
  • ExchangeMailboxSize.txt
    I ended up changing the way the .vbs handled printing. Here's my Kaseya script and the .vbs program. You'll need to change the temp directory references. Ours is c:\presidium\scripts. Save ExchangeMailboxSize.txt as .vbs.

    It's working for us, so let me know if you have any issues.

    Thanks!

    Script Name: Exchange Mailbox Size
    Script Description: This script checks mail box sizes on exchange 2003 servers. This will help you determine who the largest mailboxes are for cleanup. After script runs it creates a log with the proper information located in the get files area.


    IF Test Registry Key
    Parameter 1 : HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeSA
    Exists :
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : tempdir
    OS Type : 0
    Write File
    Parameter 1 : #tempdir#\scripts\ExchangeMailboxSize.vbs
    Parameter 2 : VSASharedFiles\ExchangeMailboxSize.vbs
    OS Type : 0
    Execute File
    Parameter 1 : %windir%\system32\wscript.exe
    Parameter 2 : #tempdir#\scripts\ExchangeMailboxSize.vbs
    Parameter 3 : 1
    OS Type : 0
    Get File
    Parameter 1 : #tempdir#\scripts\ExchangeMailboxSize.txt
    Parameter 2 : Exchange\MailboxSize
    Parameter 3 : 0
    OS Type : 0
    ELSE
    Write Script Log Entry
    Parameter 1 : Not an Exchange Server
    OS Type : 0



    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: billmccl
  • I'm having the same problem as before. It just puts in the title (header) and no actual data. If I run it from the server directly its fine.

    Any ideas?

    M


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: mnikravesh
  • Yeah, we have the same problem.

    The report output is blank except for the report header info.

    Any suggestions?

    We tried running it as System instead of User but that didn't make any difference.


    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: kentschu
  • I can't get the MailboxSize script to fail on my system, but another script I was working on (Queue Information) is doing the same thing - just the header is printing when run from Kaseya, but when I run it native, it produces the report.

    I did find a workaround for my issue. Create a .bat file in your c:\temp directory (mine is c:\presidium\scripts) with the following:

    %windir%\system32\wscript.exe c:\presidium\scripts\ExchangeMailboxSize.vbs

    When I run a Kaseya script that runs the .bat file, the report generates like its supposed to. See below:

    Script Name: Exec Bat File
    Script Description: This will execute a .bat file

    IF True
    THEN
    Execute Shell Command - (Continue on Fail)
    Parameter 1 : c:\presidium\scripts\Exch-Bat
    Parameter 2 : 0
    OS Type : 0
    Pause Script
    Parameter 1 : 20
    OS Type : 0
    Get File - (Continue on Fail)
    Parameter 1 : c:\presidium\scripts\ExchangeMailboxSize.txt
    Parameter 2 : Exchange\ExchangeMailboxSize
    Parameter 3 : 1
    OS Type : 0
    ELSE





    Legacy Forum Name: Script Requests,
    Legacy Posted By Username: billmccl