de-DEen-GB
 
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.

Just a quick PowerShell one-liner on how to find all configured room lists in your Exchange organization:

Set-ADServerSettings -ViewEntireForest $true

Get-DistributionGroup -ResultSize Unlimited | Where {$_.RecipientTypeDetails -eq "RoomList"} | Format-Table DisplayName,Identity,PrimarySmtpAddress –AutoSize 

Enjoy Exchange.

 

 

Read More »

The following PowerShell snippet helps to create room lists for the Room Finder functionality in Outlook or Outllok on the Web.

This snippet creates a new room list named All Video Conference Rooms. The display name is shown in the Room Finder combo box. The room list members are a mixture of physical rooms (where you actually go to) and virtual rooms which you just dial into.

# General Properties
$DisplayName = 'All Video Conference Rooms'
$Name = 'DEP_IT_AllVideoConfRooms'
$Alias = 'IT_AllVideoConfRooms'
$Notes = 'Room List for Outlook Roomfinder | All Video Conference Rooms'
$OU = 'MCSMLABS.de/Exchange/Groups/RoomLists'
$EmailAddress = 'ITAllVideoConfRooms@mcsmemail.de'

# Romm List Members 
$Members = @('Conference Room 1','Conference Rooms 2','Virtual Dial-In Room 4711')
 
# Create Distribution Group as Room List 
New-DistributionGroup -DisplayName $DisplayName -Name $Name -Alias $Alias -Notes $Notes -Type Distribution -OrganizationalUnit $OU -PrimarySmtpAddress $EmailAddress -Members $Members -RoomList


Use this snippet to start developing your own Exchange PowerShall code for creating and managing rooms and room lists.

If you want to create new rooms and security groups for managing full-access and send-as permissions, use my PowerShell script Create a new Room Mailbox with Security Groups.

Enjoy Exchange!

 

 

Read More »

The PowerShell script to create a new room mailbox has been updated to Version 1.1.

The new release supports adding of a phone number to the room details. Issue #2 is now closed.

Creating a separate security group for calendar booking is still open as issue #1.

 

You can read the original and up-to-date blog post here: Create a new room mailbox with security groups

Links

 

 

Read More »

The PowerShell script to set Client Access mailbox settings based on AD group membership has been updated.

The issue fixed had been registered as issue #1. 

The new release version is v1.1.

Download

 

 

Read More »
On January 13, 2018
0 Comment
667 Views
Last updated: 2018-01-15

Exchange Server 2013Exchange Server 2016Problem

When you migrate messages from alternative email solution (e.g. Lotus Notes) you might migrate sentitive content that must stay private in the new Exchange Server target location. 

So how can you mark such messages as private?

Solution

The privacy level (Sensitivity) of a mailbox item is controlled by MAPI extended property 0x36.

  • 0x36 = 0, sensitivity = normal
  • 0x36 = 2, sensitivity = private

The command line tool searches for messages containing a given text as a subject substring.

The c# code sets the extended property 0x36 to 2.

A mailbox is accessed using Exchange Web Services. The EWS endpoint is discovered using AutoDiscover for the selected mailbox.

The item modificatiuon is handled by the following code segment:

foreach (var extendedProperty in Message.ExtendedProperties)
{
	if (extendedProperty.PropertyDefinition == extendedPropertyDefinition)
	{
		if (log.IsInfoEnabled)
		{
			log.Info(string.Format("Try to alter the message: {0}", Message.Subject));
		}
		else
		{
			Console.WriteLine("Try to alter the message: {0}", Message.Subject);
		}

		// Set the value of the extended property to 0 (which is Sensitivity normal, 2 would be private)
		Message.ExtendedProperties[extendedPropertyindex].Value = 2;

		// Update the item on the server with the new client-side value of the target extended property
		Message.Update(ConflictResolutionMode.AlwaysOverwrite);
	}
	extendedPropertyindex++;
}

Usage

SetPrivateFlags.exe -mailbox user@domain.com -subject "[private]" 

Search the mailbox for all messages having a subject string containing [private] and ask for changing each item if -logonly is not set to true.
If -logonly is set to true only a log will be created.

 

SetPrivateFlags.exe -mailbox user@domain.com -subject "[private]" -noconfirmation

Search the mailbox for all messages having a subject string containing [private] and change all found messages without confirmation.

 

Note

It should be noted that this solution is intended for use in migration scenarios.

When providing access to mailbnox delegates you can enable access to your private elements as well. But access to shared mailboxes is not configured using the delegation workflow.

The code has been tested using Exchange Server 2013 CU15.

The program utilizes log4net to log detailed information to the file system. The configuration is controlled by the application's config file.

Updates

  • 2018-01-13: Release 1.0.0.0

Links

Any issues or feature requests? Use Github.

Like the code? Leave a note.

 

Read More »