Shell command to report Mailbox statistics

The below Shell command will return user mailbox statistics that can be graphed and reported in excel.

get-exchangeserver | Where {$_.IsMemberOfCluster -match “yes”} | Get-MailboxStatistics | Sort @{expression=”totalitemsize”;descending=$true} | select ServerName,DisplayName, @{expression={$_.totalitemsize.value.ToMB()}}, itemcount, lastlogontime, lastlogofftime,lastloggedonuseraccount | Sort-Object ServerName | Export-csv C:\MBreport.csv

Posted in Exchange 2007 Shell Commands | Tagged | Leave a comment

Dan

WP_20141206_0031 - Copy

Posted in Uncategorized | Leave a comment

Failure [0xC3EC7814] Pool is not ready.

When adding an additional Enterprise Edition Server to an OCS Pool we are seeing the error;

Failure [0xC3EC7814] Pool is not ready.

I am currently In the process of troublshooting with Microsoft however I thought I would add the steps taken in the event it saves someone else some grief.

First round of troubleshooting involved netmon monitoring the traffic leaving the new server we were adding to the pool. Microsoft then came to the conclusion that we need to verify the SPN associated with the account that our SQL instance was running under on the backend SQL server.

To correct this, we need to confirm the port listened by SQL server and add the right servicePrincipalName for danfrax.local\sqlservice. Below are the detailed steps:

 1. Confirm the port listened by SQL server

 a. Go to SQL Server and open SQL Server Configuration Manager

b. On the left pane, expand SQL Server 2005 Network Configuration -> Protocols for RTC

c. On the right pane, ensure TCP/IP is Enabled and double click it to open its Properties

d. Under IP addresses, find the port number in IPAll section and confirm whether it is 64121.

 If it is not 64121, please let me know and we will involve SQL engineer to check it.

 

 2. Add the right servicePrincipalName for danfrax.local\sqlservice

 a. Open ADSIEDIT console and connect to domain partition of  DC e.g. DomainController.danfrax.local

b. Expand to the object  danfrax.local\sqlservice and open its Properties

c. In its servicePrincipalName attribute, add MSSQLSvc/hpcsql005.danfrax.local:64121 and click OK

d. Force AD replication

This did not resolve the issue for us, more to come.

**Update**

Issue resolve, It seems our environment was missing a vaule for “msRTCSIP-ConferenceDirectory

Once this value was set, using our Pool distinguished name the installation completed successfully.

(&(objectCategory=msRTCSIP-ConferenceDirectory)(msRTCSIP-ConferenceDirectoryHomePool=CN=LC Services,CN=Microsoft,CN=OCSPool,CN=Pools,CN=RTC Service,CN=Microsoft,CN=System,DC=det,DC=win))

Hope this helps someone.

Posted in OCS 2007 R2 | 1 Comment

Tunes

Dead Letter Circus –

http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=23884344

The Getaway Plan –

http://www.myspace.com/thegetawayplan

Gyroscope –

http://www.myspace.com/gyroscope

The Herd –

http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=29686237

Karnivool –

http://www.myspace.com/karnivool

Posted in x_Music | 1 Comment

MailBox Database Creation Shell Command Script

The below command will create a new Mailbox store, replace ServerName with Valid Server.

New-mailboxdatabase -StorageGroup “ServerName\ServerName-SG01” -Name “ServerName-SG01-MB01” -EdbFilePath “M:\ServerName-SG01-MB01\ServerName-SG01-MB01.edb”

Posted in Exchange 2007 Shell Commands | Leave a comment

Storage Group Creation Shell Command Script

The below command will create a new Storage Group, replace ServerName with valid Server.

New-StorageGroup -Name: “ServerName-SG01” -server: “ServerName” -logfolderpath: “I:\ServerName-SG01-TL01” -SystemFolderPath: “I:\ServerName-SG01-TL01”

Posted in Exchange 2007 Shell Commands | Leave a comment

Message Tracking Shell Command

It has taken me a little while to get to this point, the below two querys will return inbound to Recipient and Outbound from Recipient.  **Note** This blog seems to hide some of the text however if you select all of the command and paste into notepad you should get the complete string.

-Inbound to Recipient

Get-ExchangeServer | where {$_.isHubTransportServer -eq $true} | Get-MessageTrackingLog -Recipient “UserSMTPAddress” -Start “04/07/2008 9:00am” -End “04/07/2008 6:00pm” | select-object Timestamp,Sender,@{Name=”Recipients”;Expression={$_.recipients}},MessageSubject,ServerHostname,ClientHostname,Source,EventId | Export-csv C:\DanielTest.csv

 -Outbound from Sender

Get-ExchangeServer | where {$_.isHubTransportServer -eq $true} | Get-MessageTrackingLog -Sender “UserSMTPAddress” -Start “01/07/2008 9:00am” -End “04/07/2008 6:00pm” | select-object Timestamp,Sender,@{Name=”Recipients”;Expression={$_.recipients}},MessageSubject,ServerHostname,ClientHostname,Source,EventId | Export-CSV C:\DanielTest.csv

If you need to be more specific and return results only matching the below Events then add from this list;

Here’s a list of some of these EventIDs:
– SUBMIT – mailbox server submitted to hub
– SEND – message sent by SMTP
– DELIVER – message delivered to mailbox,
– FAIL – delivery failed
– DSN – a delivery status notification was generated
– EXPAND – dist. group expanded
– RECEIVE – message received and committed to the Store
– REDIRECT – message redirected to alt recipient, and a few others)

Posted in Exchange 2007 Shell Commands | Tagged , , , | Leave a comment

Mailbox Size Shell Command Single User

The below command will return a single users mailbox size.

Get-MailboxStatistics -Identity “domain\UserName” | Sort -Property DisplayName | ft DisplayName, @{expression={$_.totalitemsize.value.ToMB()};label=”Mailbox Size(MB)”}, itemcount, lastlogontime, lastlogofftime,lastloggedonuseraccount -wrap

Posted in Exchange 2007 Shell Commands | Tagged | Leave a comment

Exchange 2007 Migration Requirements

The below requirements assume that the current environment being upgraded has an existing Exchange 2000 or 2003 environment present. 

Infrastructure requirements for Exchange 2007.

Domain function level must be – Windows 2000 Server domain functional level or higher.

Forest function level must be – Windows 2000 forest functional level or higher.

Prepare Legacy Exchange Permissions – Setup /PrepareLegacyExchangePermissions.

Server requirements for Exchange 2007.

64-bit edition of Windows Server 2003.

Cluster continuous replication and single-copy cluster require Windows Server 2003 Enterprise.

Microsoft .NET Framework version 2.0.

Microsoft Windows Powershell.

MMC 3.0

Further requirements for Server roles.

Mailbox Server Role

Com+ Access

IIS

World Wide Web Service

Client Access Server Role

World Wide Web Service

Remote procedure call (RPC) over HTTP Proxy

ASP.NET version 2.0

Posted in Exchange 2007 | 1 Comment

Granting Mailbox Permission via Exchange 2007 Shell

The below shell command grants Administrator Full mailbox access to User. 

“Add-MailboxPermission -Identity “User” -User Administrator -Accessright Fullaccess -InheritanceType all”

Posted in Exchange 2007 Shell Commands | Leave a comment