Friday 31 January 2014

Reduce Shareweddb_log file size

Use SQL Management Studio & connect to ##SSEE database

Choose the ShareWebDB

New query & run below to reduce log file size

USE ShareWebDb
 GO
 DBCC SHRINKFILE(ShareWebDb_log, 1)
 BACKUP LOG ShareWebDb WITH TRUNCATE_ONLY
 DBCC SHRINKFILE(ShareWebDb_log, 1)
 GO

Wednesday 22 January 2014

Connecting to the Windows Internal Database (MICROSOFT##SSEE)

Using SQL Management Studio

The server name to connect to is 
\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

Thursday 9 January 2014

Remove disconnected mailboxes in Exchange 2007

Get all disconnected mailboxes
Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
Remove a single disconnected mailbox
Remove-Mailbox -Database -StoreMailboxIdentity -confirm:$false
Remove all disconnected mailboxes
$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid,Database
Then all disconnected mailboxes are in a variable and you run following cmdlet to remove mailboxes
$users | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }