cant't run the Troubleshoot-DatabaseSpace.ps1 script

Answered cant't run the Troubleshoot-DatabaseSpace.ps1 script

  • Thursday, May 10, 2012 10:25 AM
     
     

    the Troubleshoot-DatabaseSpace.ps1 located in C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 10\2809

    so in exchange management shell ,i changed the path to C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 10\2809

    then I issued the following command

    .\Troubleshoot-DatabaseSpace.ps1

    then I got this output

    C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 10\2809\Tro
    ubleshoot-DatabaseSpace.ps1 : Parameter set cannot be resolved using the specified named parameters.
    At line:1 char:33
    + .\Troubleshoot-DatabaseSpace.ps1 <<<<
        + CategoryInfo          : InvalidArgument: (:) [Troubleshoot-DatabaseSpace.ps1], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameterSet,Troubleshoot-DatabaseSpace.ps1

    I don't know what to do

All Replies

  • Thursday, May 10, 2012 10:42 AM
     
     Answered

    The PS should be executed on mailbox server...check you have set restriction on execution on powershell script in the Exchange management shell..

    You should have proper mailbox persmission to execute the same ...find the url for your detail..

    http://technet.microsoft.com/en-us/library/dd638132.aspx

    http://technet.microsoft.com/en-us/library/bb123798.aspx

    http://technet.microsoft.com/en-us/library/ff477617.aspx


    Exchange Queries

  • Thursday, May 10, 2012 11:35 AM
     
     

    thanks ,I will read the given links and feed you back ,thanks

  • Friday, May 11, 2012 7:08 AM
    Moderator
     
     

    Hi om zeyad,

    Any updates?

    Please run the script from C:\Program Files\Microsoft\Exchange Server\V14\Scripts on Exchange 2010 Mailbox Server Role to test it first.


    Frank Wang

    TechNet Community Support

  • Sunday, May 13, 2012 7:08 AM
     
     

    hi frank

    thanks for your advice ,I already did that it was worked and gave this output

    i run the script using through command line prompt using the command cscript as shown below

    C:\Program Files\Microsoft\Exchange Server\V14\Scripts>CScript Troubleshoot-Data
    baseSpace.ps1.vbs
    Microsoft (R) Windows Script Host Version 5.8
    Copyright (C) Microsoft Corporation. All rights reserved.

    Input Error: Can not find script file "C:\Program Files\Microsoft\Exchange Serve
    r\V14\Scripts\Troubleshoot-DatabaseSpace.ps1.vbs".

    but I didn't find any output in the event viewer in Microsoft-Exchange-Troubleshooters/Operationalunder  under Microsoft

    how to get  the output of the script

  • Sunday, May 13, 2012 7:54 AM
     
     Answered
    Hi,
    Frank gave you a good advice.

    What I don't understand is why you tried to run it in CMD and added .vbs to the script. That wont work.

    You must run the script in Exchange Management Shell (EMS) and if you want to know about the syntax you can use, start with get-help .\Troubleshoot-DatabaseSpace.ps1

    Martina Miskovic