hello
Google
Welcome to Carpe Diem: Flaphead@Home Sign in | Join | Help

Carpe Diem: Flaphead.com

Seize the Day

News


  • Add to Technorati Favorites <script type="text/javascript" src="http://technorati.com/embed/3ni3q36ikc.js"> </script>
    This information is provided "AS IS" with no warranties, and confers no rights. Also some of the information contains my views and thoughts.
    <script src="http://widgets.technorati.com/t.js" type="text/javascript" charset="UTF-8"></script>

    Add Me! - Search Engine Optimization

    I heart FeedBurner

Powershell Warnings

Do you know how sometimes you write a script and the output looks lovely, but for some stupid reason a yellow warning message ruins it.

Well my school day learning from today is that you can turn them off!

So lets say I run this

[PS] C:\PS>get-mailboxdatabase -server [Server]

Name                 Server       StorageGroup         Recovery
----                 ------       ------------         --------
SG2DB2               [Server]     SG2                  False
WARNING: Object [Server]\SG2\SG2DB2 has been corrupted and it is in an
inconsistent state. The following validation errors have occurred:
WARNING: Exchange cannot store database (.edb) files in the root directory.
Please choose another location. The specified file path is 'J:\SG2DB2.edb'.
SG2DB1               [Server]     SG2                  False
WARNING: Object [Server]\SG2\SG2DB1 has been corrupted and it is in an
inconsistent state. The following validation errors have occurred:
WARNING: Exchange cannot store database (.edb) files in the root directory.
Please choose another location. The specified file path is 'J:\SG2DB1.edb'.
SG1DB1               [Server]     SG1                  False
WARNING: Object [Server]\SG1\SG1DB1 has been corrupted and it is in an
inconsistent state. The following validation errors have occurred:
WARNING: Exchange cannot store database (.edb) files in the root directory.
Please choose another location. The specified file path is 'G:\SG1DB1.edb'.
SG1DB2               [Server]     SG1                  False
WARNING: Object [Server]\SG1\SG1DB2 has been corrupted and it is in an
inconsistent state. The following validation errors have occurred:
WARNING: Exchange cannot store database (.edb) files in the root directory.
Please choose another location. The specified file path is 'G:\SG1DB2.edb'.
SG1DB3               [Server]     SG1                  False
WARNING: Object [Server]\SG1\SG1DB3 has been corrupted and it is in an
inconsistent state. The following validation errors have occurred:
WARNING: Exchange cannot store database (.edb) files in the root directory.
Please choose another location. The specified file path is 'G:\SG1DB3.edb'.

No do this:
[PS] C:\PS>$WarningPreference = "SilentlyContinue"
[PS] C:\PS>get-mailboxdatabase -server [Server]

Name                 Server       StorageGroup         Recovery
----                 ------       ------------         --------
SG2DB2               [Server]     SG2                  False
SG2DB1               [Server]     SG2                  False
SG1DB1               [Server]     SG1                  False
SG1DB2               [Server]     SG1                  False
SG1DB3               [Server]     SG1                  False

Posted: 03 June 2008 14:50 by Paul Flaherty

Comments

subject: exchange said:

How Microsoft Office Communicator enhances Outlook 2007 functionality Why boot an Exchange server from

# June 6, 2008 19:03
New Comments to this post are disabled