MVP - Most Valuable Professional
rss

Just can't get enough of IT

This blog is about mostly anything in IT. But the primary focuses are Microsoft Technologies like Exchange, Office 365, Azure and Cloud Security.

Description

This script removes orphaned ActiveSync device partnerships from Exchange Server 2010 user mailboxes. Run the script as a scheduled job to maintain your Exchange Server environment properly.

Modifiy the script path variables to fit your requirements. The variables are configured in the ### BEGIN Variables section.

Steps being executed by the script:

  1. Fetch all user mailboxes
  2. Iterate through each user mailbox and determine the number of ActiveSync devices and the number of devices which have not synchronized since 150 days
  3. Delete ActiveSync device registration, if a user has more than 4 devices in total and a minimum of 1 device that has not synced within 150 days

Examples

Remove-ActiveSyncDevicePartnership

Version History

  • 1.0, Initial community release

Links

Additional Credits

Additional credits go to Sebastian Rubertus

Follow

 

 

Read More »

Description

The script published by the Exchange Team requires an update when run on a system that does not use the en-US locale as Culture.

When the script analyses the saved log file information, a DateTime error is beeing thrown:

Cannot convert value "21/05/2010" to type "System.DateTime"

Note
Version 2.1 of the script published by the Exchange Team works without the fix.

Examples

See: http://blogs.technet.com/b/exchange/archive/2013/10/07/analyzing-exchange-transaction-log-generation-statistics.aspx

Version History

  • 1.0, Initial community update

Links

Additional Credits

Additional credits go to Microsoft Exchange Team.

Follow

Read More »

The script published by the Exchange Team (Analyzing Exchange Transaction Log Generation Statistics) requires an update when run on a system that does not use the en-US locale as Culture.

When the script analyses the saved log file information, a DateTime error is being thrown:

Cannot convert value "21/05/2010" to type "System.DateTime"

See the original blog post for examples: http://blogs.technet.com/b/exchange/archive/2013/10/07/analyzing-exchange-transaction-log-generation-statistics.aspx

The script utilizes the Get-UICulture cmdlet to fetch the culture settings required to have [DATETIME]::Parse() work as expected.

DateTime values are stored in the CSV file using the UICulture setting, but [DATETIME]::Parse() uses the local culture settings to parse values by default.

To check your settings in PowerShell use the following cmdlets:

  • Get-Culture
  • Get-UICulture

Links

 

Read More »

Description

This script adds multiple public folder servers to all public folders below a TopPublicFolder.

The script has been developed as part of an on-premise legacy public folder migration from Exchange 2007 to Exchange Server 2010.

The script waits a given timespan in seconds to let public folder hierarchy replication and replica backfill requests kick in.

It is assumed that the script is being run in an Exchange 2007 or Exchange 2010 server.

Examples

# Add replicas for SERVER01,SERVER02 to all sub folders of \COMMUNICATIONS\PR

.\Add-PFReplica.ps1 -ServersToAdd SERVER01,SERVER02 -PublicFolderServer SERVER01 -TopPublicFolder "\COMMUNICATIONS\PR

Version History

  • 1.0, Initial community release
  • 1.1, Fixes to run properly with Exchange 2010

Links

Follow

Read More »

Michael Hall of MCS has published on excellent Excel tool to simplify the migration of on-premise Exchange mailboxes to Office 365.

The script does support not special characters in display names as it is intended to work with ASCII files.

The textfile type used by Excel VBA code has been changed from 437 to 65001.

When you want to use the attached Excel file you are required to create an UTF-8 export when collecting mailbox data. The required PowerShell code is as follows:

$mbx=Get-Mailbox -resultsize unlimited; $mbx | foreach-object {$UPN = $_.UserPrincipalName; $EmailAddress = $_.PrimarySmtpAddress;$OU = $_.OrganizationalUnit; $Type = $_.RecipientTypeDetails; $_ | Get-MailboxStatistics | select @{Name="UPN";expression={$UPN}},@{Name="EmailAddress";expression={$EmailAddress}},@{Name="Type";expression={$Type}},@{Name="OU";expression={$OU}},DisplayName,@{Name="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},LastLogonTime}|Export-csv .\Mailboxes_Output.csv -notype	-Encoding UTF8

Then just follow the instructions provided in Michaels blog post.

Links

Download

 


Unsure, if you should migrate to Office 365? You want to know more about security of cloud applications and services? Your Exchange Server infrastructure requires an upgrade? Contact me via email: thomas@mcsmemail.de

 

Read More »