none
Need help on scripting to skip exchange databse for checking RRS feed

  • Question

  • Hello,  There is a default script in exchange in 2010 to check the DB replication by default it will check for all BUt if we need to skip any of the DB i need to mentioned the same; so for one DB is working fine but when adding more then one its not working and alert is getting generated

    # Skip checking the "default" mailbox databases. eg: Mailbox Database 0017891750
        # Specify $null (or an empty string) if you don't want to skip any databases.
        [Parameter(ParameterSetName="Server")]
        [string] $SkipDatabasesRegex = "^Mailbox Database \d{10}$|^ABC-DB", ## the BOLD for one Database to skip what if i need to need to skip more then one database , i tried adding the below but seems to be it is not working ?

    #Do i need to user comma, or any other symbol to mentioned two DB's

    ^ABC-DB,HOME-DB", OR ^ABC-DB,^HOME-DB",

    #I tried the below but it is not working

    # Skip checking the "default" mailbox databases. eg: Mailbox Database 0017891750
        # Specify $null (or an empty string) if you don't want to skip any databases.
        [Parameter(ParameterSetName="Server")]
        [string] $SkipDatabasesRegex = "^Mailbox Database \d{10}$|^ABC-DB|^HOME-DB",


    • Edited by Jugalkumar Thursday, October 30, 2014 6:22 AM
    Thursday, October 30, 2014 5:25 AM

Answers

  • sorry but able to make the changes now and its working as expected .thanks

    [string] $SkipDatabasesRegex = "^Mailbox Database \d{10}$|(ABC-DB)|(HOME-DB)",

    • Marked as answer by Jugalkumar Thursday, October 30, 2014 9:37 AM
    Thursday, October 30, 2014 9:37 AM

All replies

  • There is no OR in Regex.  Use |.

    You cannot just edit the script parameters to get what you want.  You need to call the script with correct parameters.  Ask the author of the script to help you understand it.  What you have posted I not helpful.


    ¯\_(ツ)_/¯

    Thursday, October 30, 2014 6:36 AM
  • JRV, script is working very fine and i am able to skip the one of the DB (ABC-DB) as well but i need to know what if i need to skip two Database of different names

    I tried below but some how it is not working

    [string] $SkipDatabasesRegex = "^Mailbox Database \d{10}$|^ABC-DB|^HOME-DB",

    Thursday, October 30, 2014 7:12 AM
  • sorry but able to make the changes now and its working as expected .thanks

    [string] $SkipDatabasesRegex = "^Mailbox Database \d{10}$|(ABC-DB)|(HOME-DB)",

    • Marked as answer by Jugalkumar Thursday, October 30, 2014 9:37 AM
    Thursday, October 30, 2014 9:37 AM
  • sorry but able to make the changes now and its working as expected .thanks

    [string] $SkipDatabasesRegex = "^Mailbox Database \d{10}$|(ABC-DB)|(HOME-DB)",

    My point is that you are not supposed edit the supplied scrip but are supposed to pass in your own parameters.  THe default behavior is set by the author by design.

    Since you have not supplied us with a copy of the script it is not possible to understand exactly what is intended.

    Normally we would mark the supplied answer as the "answer" and not your response to that.  THe answr was that you need to use a correct RegEx and not just place an arbitrary "OR" in the RegEx.


    ¯\_(ツ)_/¯

    Thursday, October 30, 2014 1:52 PM