Posts Tagged Exchange 2007
PowerShell Script to E-Mail User Mailbox Storage Limit Status
Posted by JBrokaw in Exchange 2007, Exchange 2010 on March 4, 2010
A storage status of “NoChecking” means they do not have a mailbox limit.
To schedule the script. Through Windows Scheduler “PowerShell.exe -PSConsoleFile "C:\Program Files\Microsoft\Exchange Server\Bin\ExShell.psc1" -Command “C:\Script.ps1"
Save as a .ps1 file
________________________________________________
$FromAddress=MailboxReport@domain.com
$ToAddress=ExampleUser@domain.com
$MessageSubject="Mailbox Report"
$MessageBody="User Mailbox Storage Limit Status"
$SendingServer="emailserver.domain.com"
$file="C:\Mailboxes.txt"
Get-MailboxStatistics | Sort-Object StorageLimitStatus | ft DisplayName, StorageLimitStatus, ItemCount > $file
$SMTPMessage = New-Object System.Net.Mail.MailMessage $FromAddress, $ToAddress, $MessageSubject, $MessageBody
$Attachment = new-object System.Net.Mail.Attachment $file
$SMTPMessage.Attachments.Add($Attachment)
$SMTPClient=New-Object System.Net.Mail.SMTPClient $SendingServer
$SMTPClient.Send($SMTPMessage)
Recreate Offline Address Book (OAB) in IIS and Active Directory
Posted by JBrokaw in Exchange 2007 on November 11, 2009
From the Exchange Shell:
get-oabvirtualdirectory | format-list > c:\oab.txt
Open the oab.txt file. The Name field will be used in the “Identity” command below. The Internal and External URL will be used in the “InternalURL” and “ExternalURL” below.
Remove-OabVirtualDirectory -Identity "OAB (Default Web Site)"
A Virtual Directory named “OAB” must not exist in IIS, if it does it will need to be deleted before running this command.
New-OABVirtualDirectory -ExternalUrl http://mail.domain.org/oab -InternalUrl http://mail.domain.org/oab
Find Email Addresses In Active Directory
Posted by JBrokaw in Active Directory, Exchange 2007 on October 8, 2009
Using CSVDE/LDIFDE to find an email address:
csvde -f outputfilename.csv -d "dc=domain,dc=com" -r "(&(mailnickname=*)(proxyAddresses=smtp:UserName@domain.com))" -l name
Replace "dc=domain,dc=com" with your AD domain name and suffix, and UserName@domain.com with the exact email address you’re looking for.
To find all recipients who have an email address from a particular SMTP domain, you can use a wildcard, e.g.:
csvde -f outputfilename.csv -d "dc=domain,dc=com" -r "(&(mailnickname=*)(proxyAddresses=smtp:*@domain.com))" -l name
In the above example, only the name field is exported. All CSVDE/LDIFDE queries also return the object’s distinguishedName. To add more fields to the list, insert a coma after name and type new field names separated by a coma: e.g.
name,displayName,sAMAccountName,proxyAddresses,homeMDB
Finding email addresses using the Exchange shell (Exchange Server 2007): The Exchange Server 2007 shell makes it easier (once you familiarize yourself with shell basics). To get a list of all recipients with email addresses from a particular domain:
get-recipient | where {$_.emailaddresses -match "domain.com"} | select name,emailaddresses
To get a list of recipients with a particular email address:
get-recipient | where {$_.emailaddresses -match "UserName@domain.com"} | select name,emailaddresses
Blank OWA Page After Installing Exchange Rollup Patch
Posted by JBrokaw in Exchange 2007 on October 8, 2009
OWA Client page error will be similar to this:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; Tablet PC 2.0; MS-RTC LM 8 )
Timestamp: Wed, 7 Oct 2009 15:36:45 UTC
Message: Syntax error
Line: 6
Char: 1
Code: 0
URI: https://mail.domain.com/owa/8.1.393.1/scripts/premium/flogon.js
The C:\Program Files\Microsoft\Exchange Server\ClientAccess\OWA\8.1.393.1\scripts basic and premium folders were missing files. I copied the files from the 8.1.375.2 folder into the 8.1.393.1\ basic and premium folder, but did not overwrite any files with a newer date. Verified that subfolders in folder 8.1.393.1 were not missing additional files.
I then went into IIS – Default Web Site – OWA – 8.1.393.1 – Directory Security Tab – Authentication and enabled anonymous access for IUSR_SCO-Exchange.
Recover Exchange 2007 Server
Posted by JBrokaw in Exchange 2007 on September 21, 2009
- Use ADSIEdit to find where Exchange was installed. Expand Configuration, CN=Configuration, DC=<domain>, DC=<domain_ext>, CN=Services, CN=Microsoft Exchange, CN=<company name>, CN=Administrative Groups, CN=Exchange Administrative Group (admin group id), CN-Servers, CN=<exchange server>.
- Right-click the server name, select Properties.
- Select “Show only attributes that have values”
- Find the full path of the Exchange server attributes. Make note of each drive letter and path.
- Display the path of each storage group and database on the server by expanding CN=<server name>, CN=Information Store, CN=<storage group>
- Examine the properties of each Storage Group and Database.
- Configure Drives/Partitions the same as the failed Exchange server.
- Install the same OS as the failed server. Install service packs and security updates.
- Name the server the same as the failed server.
- Reset the old Exchange server computer account in AD by right-clicking it and select Reset.
- Join the Exchange server to the domain.
- Disable inbound E-Mail at the firewall.
- Install Exchange 2007 on the replacement server using Setup /m:RecoverServer
- For the databases that will be restored. Check “This Database can be overwritten by a restore”
- Reinstall any 3rd party SSL Certs.
- Install VSS Snapshot Patch KB940349.
- Restore the databases to the Exchange server. (Current databases must be dismounted)
- Enable inbound E-Mail at the firewall.
- Verify client access, OWA, data, and any other features.
How To Remove The First Exchange 2007 Server From A Domain
Posted by JBrokaw in Exchange 2007 on September 20, 2009
Move 3rd Part SSL Cert to the new Exchange Server. The Install Standard SSL page will give those steps.
Move Mailboxes to the new Exchange Server.
No Support For Exchange 2007 On 2008 R2
Posted by JBrokaw in Exchange 2007, Server 2008 on September 16, 2009
From the MS Exchange Team Blog:
Exchange Server 2007 is not supported on Windows Server 2008 R2. However, Exchange 2007 SP1 RU9 and SP2 are supported against Windows Server 2008 R2 Active Directory servers. In addition, Exchange 2007 SP1 RU9 and SP2 are supported in Active Directory environments whose domain/forest functional levels have been raised to Windows Server 2008 R2.
From MS Technet:
Manually Create Exchange 2007 Routing Group to Exchange 2000/2003 Server
Posted by JBrokaw in Exchange 2007 on September 12, 2009
From the Exchange 2007 Powershell.
New-RoutingGroupConnector -Name "Interop RGC" -SourceTransportServers "Ex2007Hub1.contoso.com" -TargetTransportServers "Ex2003BH1.contoso.com" -Cost 100 -Bidirectional $true -PublicFolderReferralsEnabled $true
Specify Message Size Limit
Posted by JBrokaw in Exchange 2007 on September 12, 2009
From the Exchange Powershell:
Set-TransportConfig -MaxReceiveSize <value> -MaxSendSize <value> -MaxRecipientEnvelopeLimit <value>
For example, to set the maximum incoming message size to 10 MB, the maximum outgoing message size to 10 MB, and the maximum number of message recipients to 5000, run the following command:
Set-TransportConfig -MaxReceiveSize 10MB -MaxSendSize 10MB -MaxRecipientEnvelopeLimit 5000
We recommend that you set each organization message size limit to match the value of the corresponding global message size limit.
When you enter a value for the MaxReceiveSize parameter or the MaxSendSize parameter, qualify the value with one of the following:
· B (bytes)
· KB (kilobytes)
· MB (megabytes)
· GB (gigabytes)
Unqualified values are treated as bytes.
The valid input range for the MaxReceiveSize parameter, the MaxSendSize parameter, and the MaxRecipientEnvelopeLimit parameter is 0 to 2147483647. To remove the limit, enter a value of unlimited.
Set-SendConnector “Connector Name” –MaxMessageSize 10MB
Settings have been added to the SP1 GUI to change message size limits:
http://exchangepedia.com/blog/2007/09/exchange-server-2007-setting-message-size.html
Fix Invalid Aliases After Migrating to Exchange 2007
Posted by JBrokaw in Exchange 2007 on September 12, 2009
Save file as .PS1 extension and run from the Exchange Powershell.
Enter full path to execute script. Example: From Powershell Prompt> C:\AliasFix.ps1