Tuesday, March 21, 2017

How to Set up Rooms Properly in Office 365 - Part 2 (Extending Booking Time)


Following on from Part 1 where I talked about how to get rooms to show up in the room list, here's the next step where we extend the booking time from the default of 180 days.

Why is there a limit?

In most circumstances, a limit makes perfect sense. It stops employees from booking meeting rooms for years in advance and then leaving the company.

In our case, it's actually fairly common to book the meeting schedule up to about 18 months into the future - so the 180 day (6 month) limit is quite restricting for us.

I decided to change the limit to 730 days. Essentially two years. 

The Steps

I'm going to assume that you're familiar with PowerShell by now... I wasn't when I wrote Part 1 but now PowerShell is my friend. If you're unsure about how to execute the steps, please go back and check Part 1 as there's only a couple of commands at the end that are different.

So, without further ado;


  1. Start PowerShell as Administrator (Local Admin Rights).

  2. Set-ExecutionPolicy RemoteSigned
  3. $UserCredential = Get-Credential
  4. Put your Office365 User Name and Password (with Admin rights) in.
  5. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  6. Import-PSSession $Session
  7. Now here comes the commands that you need to change;
  8. Set-CalendarProcessing -Identity "Projects Meeting Room" -BookingWindowInDays 730 
  9. Note that "Projects Meeting Room" is the name of the room and 730 is the number of days to allow bookings in the future.
  10. You may want to add several similar lines after this. I did..

    Set-CalendarProcessing -Identity "Small Meeting Room" -BookingWindowInDays 730
    Set-CalendarProcessing -Identity "Large Meeting Room" -BookingWindowInDays 730
    Set-CalendarProcessing -Identity "Board Room" -BookingWindowInDays 730
    Set-CalendarProcessing -Identity "Projects Meeting Room" -BookingWindowInDays 730
  11. Remove-PSSession $Session
  12. Exit
That's it. You should now be able to book rooms further in the future. 

Saturday, March 11, 2017

How to use PowerShell to Change the Email Address of Office 365 Groups


One of the odd things about Office 365 is how much you have to resort to PowerShell to get things done. That's currently the case with the Office365 Groups, a recently introduced type of group that works particularly well across all of the Office365 applications. 

I've been setting a few things up with Office365 groups lately and I've had two instances where I needed to do some renames. Once was when the people who asked for the group changed their mind about the name and the other was when I wanted to rebuild an existing sharepoint site (and reuse the name).

In both cases, I was able to change the name but the email address itself was greyed out. 

The Solution is to use PowerShell

Start Powershell by clicking Start and typing PowerShell, then Right-click on the icon and run as Administrator.


In the console that appears, type;

Set-ExecutionPolicy RemoteSigned

This elevates some privileges. You'll need to choose Y and press enter. 

Next, you'll want to sign into your Office 365 account as an administrator. Type

$UserCredential = Get-Credential

and press enter.  You'll be prompted for a user name and password.

Next we need to connect a session to Microsoft Exchange in the cloud.

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

and you'll want to import that session.

Import-PSSession $Session

Changing the Email Address

This last command is the one that changes the email address but you'll need to know your group name and the new email address first.

Don't type this, you'll want to change the bold bits.

Set-UnifiedGroup -Identity "GroupName" -PrimarySmtpAddress GroupEmailAddress -RequireSenderAuthenticationEnabled $false

So, in our case, we want to change InformationTechnology1@mycompany.com.au to InformationTechnology@mycompany.com.au.  The group name is Information Technology. This means that the command to use would be;

Set-UnifiedGroup -Identity "Information Technology" -PrimarySmtpAddress informationtechnology@mycompany.com.au -RequireSenderAuthenticationEnabled $false

That's it. If you switch back to the admin screen and refresh, you'll see that the group now has the correct email address.

If you want to change more groups, you can simply run that last command line again with different parameters (all the earlier lines were just set up lines).  If you've finished, you can simply close PowerShell.