Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

Simple Surface Hub Account Configuration

$
0
0

I was looking through the documentation for setting up an account for a Surface Hub. It’s a wonderful set of documentation, but it’s also very long! Most of this was just more detailed than I needed, but I wanted a very simple, easy-to-follow script for building this in Office 365. I don’t like to do anything by hand, since I may need to do another in the future. I like consistency. This isn’t going to be ideal if you need to deploy scores of them, but this works well for deploying a few.

The first thing you’ll need is a unified PowerShell for Office 365. I’m not going to write a post on that since there’s already good documentation on creating this.

Got that working? Good. On to the script and what it does.

I really just stepped through the Surface Hub installation steps and set up sequential commands for each section. You would need to run this several times, 10 minutes or so apart, to give time to create the mailbox and for replication to finish. You know it’s working when the errors stop. The Get-CsMeetingRoom at the end is what needs to succeed for this to be completed. If that works, you should be good.

All this code comes with the normal disclaimers, of course. Try this in a lab, if at all possible. You’re on your own here – there’s no warranty on this. If you use it, please leave a comment. And remember, this is only for Office 365. On-premises systems would be done differently.

# New-SurfaceHubAccount.ps1 - grb - 03/24/2017 - Adds and configures a new Surface Hub account.

# Configuration variables. You need to replace these with whatever makes sense for your environment - especially the password!
$SurfaceHubDisplayname = 'Surface Hub 01'
$SurfaceHubAlias = 'SurfaceHub01'
$SurfaceHubPassword = 'Super-Secret1Password!'
$SurfaceHubMobilePolicy = "Surface Hubs"

# Additional calculated variables
$SurfaceHubLicense = (Get-MsolAccountSku | ? {$_.AccountSkuID -like "*ENTERPRISEPREMIUM"}).AccountSkuID
$MSOLAccountSKU = Get-MsolAccountSku
$TenantId = $MSOLAccountSKU[0].AccountObjectId.Guid
$TenantName = ($MSOLAccountSKU[0].AccountName)
$TenantDomain = $TenantName+'.onmicrosoft.com'
$SurfaceHubAccount = $SurfaceHubAlias+'@'+$TenantDomain

# Create mailbox and configure
New-Mailbox -MicrosoftOnlineServicesID $SurfaceHubAccount -Alias $SurfaceHubAlias -Name $SurfaceHubDisplayname -Room -EnableRoomMailboxAccount $true `
     -RoomMailboxPassword (ConvertTo-SecureString -String $SurfaceHubPassword -AsPlainText -Force) -ErrorAction SilentlyContinue

New-MobileDeviceMailboxPolicy -Name $SurfaceHubMobilePolicy -PasswordEnabled $false -ErrorAction silentlycontinue
Set-CASMailbox -Identity $SurfaceHubAccount -ActiveSyncMailboxPolicy $SurfaceHubMobilePolicy

Set-CalendarProcessing -Identity $SurfaceHubAccount -AutomateProcessing AutoAccept -AddOrganizerToSubject $false –AllowConflicts `
     $false –DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false

Set-CalendarProcessing -Identity $SurfaceHubAccount -AddAdditionalResponse $true -AdditionalResponse "This room is equipped with a Surface Hub"

Set-Msoluser -UserPrincipalName $SurfaceHubAccount -UsageLocation US

# Apply Office 365 License
Set-MsolUserLicense -UserPrincipalName $SurfaceHubAccount -AddLicenses $SurfaceHubLicense -ErrorAction SilentlyContinue

Get-CASMailbox $SurfaceHubAccount | fl Identity,ActiveSyncMailboxPolicy
Get-MsolUser -UserPrincipalName $SurfaceHubAccount | fl DisplayName,UsageLocation

# Skype for Business account and configuration.
$RegistrarPool = (Get-CsOnlineUser -Identity $SurfaceHubAccount).RegistrarPool

Enable-CsMeetingRoom -Identity $SurfaceHubAccount -RegistrarPool $RegistrarPool -SipAddressType EmailAddress
Get-CsMeetingRoom -identity $SurfaceHubAccount | fl DisplayName,IsValid,SipAddress

echo "end of script"

Viewing all articles
Browse latest Browse all 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>