diff --git a/devices/surface-hub/appendix-a-powershell-scripts-for-surface-hub.md b/devices/surface-hub/appendix-a-powershell-scripts-for-surface-hub.md index a388fc0cca..7fd65a2aa4 100644 --- a/devices/surface-hub/appendix-a-powershell-scripts-for-surface-hub.md +++ b/devices/surface-hub/appendix-a-powershell-scripts-for-surface-hub.md @@ -308,7 +308,7 @@ PrintAction "Creating a new account..." try { $mailbox = $null - $mailbox = (New-Mailbox -UserPrincipalName $credNewAccount.UserName -Alias $credNewAccount.UserName.substring(0,$credNewAccount.UserName.indexOf('@')) -room -Name $strDisplayName -RoomMailboxPassword $credNewAccount.Password -EnableRoomMailboxAccount $true) + $mailbox = (New-Mailbox -UserPrincipalName $credNewAccount.UserName -Alias $credNewAccount.UserName.substring(0,$credNewAccount.UserName.indexOf('@')) -room -Name $strDisplayName -RoomMailboxPassword $credNewAccount.Password -EnableRoomMailboxAccount $true) } catch { } ExitIfError "Failed to create a new mailbox on exchange."; $status["Mailbox Setup"] = "Successfully created a mailbox for the new account" @@ -320,9 +320,9 @@ PrintSuccess "The following mailbox has been created for this room: $strEmail" ## Create or retrieve a policy that will be applied to surface hub devices ## # The policy disables requiring a device password so that the SurfaceHub does not need to be lockable to use Active Sync -$strPolicy = Read-Host 'Please enter the name for a new Surface Hub ActiveSync policy that will be created and applied to this account. +$strPolicy = Read-Host 'Please enter the name for a new Surface Hub ActiveSync policy that will be created and applied to this account. We will configure that policy to be compatible with Surface Hub devices. -If this script has been used before, please enter the name of the existing policy.' +If this script has been used before, please enter the name of the existing policy.' $easpolicy = $null try { @@ -448,11 +448,11 @@ try { } catch { } if ($Error) { - $status["Calendar Response Configuration"] = "Failed to configure the account's response properties" + $status["Calendar Response Configuration"] = "Failed to configure the account's response properties" } else { - $status["Calendar Response Configuration"] = "Successfully configured the account's response properties" + $status["Calendar Response Configuration"] = "Successfully configured the account's response properties" } $Error.Clear() @@ -692,9 +692,9 @@ PrintSuccess "The following mailbox has been created for this room: $strEmail" ## Create or retrieve a policy that will be applied to surface hub devices ## # The policy disables requiring a device password so that the SurfaceHub does not need to be lockable to use Active Sync -$strPolicy = Read-Host 'Please enter the name for a new Surface Hub ActiveSync policy that will be created and applied to this account. +$strPolicy = Read-Host 'Please enter the name for a new Surface Hub ActiveSync policy that will be created and applied to this account. We will configure that policy to be compatible with Surface Hub devices. -If this script has been used before, please enter the name of the existing policy.' +If this script has been used before, please enter the name of the existing policy.' $easpolicy = $null try { @@ -824,11 +824,11 @@ try { } catch { } if ($Error) { - $status["Calendar Response Configuration"] = "Failed to configure the account's response properties" + $status["Calendar Response Configuration"] = "Failed to configure the account's response properties" } else { - $status["Calendar Response Configuration"] = "Successfully configured the account's response properties" + $status["Calendar Response Configuration"] = "Successfully configured the account's response properties" } $Error.Clear() @@ -866,7 +866,7 @@ catch {} $Error.Clear() if (![System.String]::IsNullOrEmpty($strRegPool)) { - $strRegPool = $strRegPool.Substring($strRegPool[0].IndexOf(':') + 1) + $strRegPool = $strRegPool.Substring($strRegPool[0].IndexOf(':') + 1) } <# $strRegPoolEntry = Read-Host "Enter a Skype for Business Registrar Pool, or leave blank to use [$strRegPool]" @@ -927,7 +927,7 @@ else $iLicenseIndex = 0; do { - $iLicenseIndex = Read-Host 'Choose the number for the SKU you want to pick' + $iLicenseIndex = Read-Host 'Choose the number for the SKU you want to pick' } while ($iLicenseIndex -lt 1 -or $iLicenseIndex -gt $skus.Length) $strLicenses = $skus[$iLicenseIndex - 1].AccountSkuId @@ -1061,7 +1061,7 @@ function ExitIfError($strMsg) } $strUpn = Read-Host "What is the email address of the account you wish to validate?" -if (!$strUpn.Contains('@')) +if (!$strUpn.Contains('@')) { CleanupAndFail "$strUpn is not a valid email address" } @@ -1192,7 +1192,7 @@ if ($fHasOnline) } catch { - # This really shouldn't happen unless there is a network error + # This really shouldn't happen unless there is a network error CleanupAndFail "Failed to connect to MSOnline" } } @@ -1247,8 +1247,8 @@ $credLinkedDomain = $Null if (!$fExIsOnline -and ![System.String]::IsNullOrEmpty($mailbox.LinkedMasterAccount) -and !$mailbox.LinkedMasterAccount.EndsWith("\SELF")) { $strLinkedAccount = $mailbox.LinkedMasterAccount - $strLinkedDomain = $strLinkedAccount.substring(0,$strLinkedAccount.IndexOf('\')) - $strLinkedUser = $strLinkedAccount.substring($strLinkedAccount.IndexOf('\') + 1) + $strLinkedDomain = $strLinkedAccount.substring(0,$strLinkedAccount.IndexOf('\')) + $strLinkedUser = $strLinkedAccount.substring($strLinkedAccount.IndexOf('\') + 1) $strLinkedServer = Read-Host "What is the domain controller for the $strLinkedDomain" $credLinkedDomain = (Get-Credential -Message "Please provide credentials for $strLinkedDomain") } @@ -1276,7 +1276,7 @@ function Validate() [switch]$WarningOnly ) - Write-Host -NoNewline -ForegroundColor White $Test.PadRight(100,'.') + Write-Host -NoNewline -ForegroundColor White $Test.PadRight(100,'.') if ($Condition) { Write-Host -ForegroundColor Green "Passed" @@ -1301,7 +1301,7 @@ function Validate() Validate -WarningOnly -Test "The mailbox $strUpn is enabled as a room account" -Condition ($mailbox.RoomMailboxAccountEnabled -eq $True) -FailureMsg "RoomMailboxEnabled - without a device account, the Surface Hub will not be able to use various key features." $calendarProcessing = Get-CalendarProcessing -Identity $strUpn -WarningAction SilentlyContinue -ErrorAction SilentlyContinue -Validate -Test "The mailbox $strUpn is configured to accept meeting requests" -Condition ($calendarProcessing -ne $null -and $calendarProcessing.AutomateProcessing -eq 'AutoAccept') -FailureMsg "AutomateProcessing - the Surface Hub will not be able to send mail or sync its calendar." +Validate -Test "The mailbox $strUpn is configured to accept meeting requests" -Condition ($calendarProcessing -ne $null -and $calendarProcessing.AutomateProcessing -eq 'AutoAccept') -FailureMsg "AutomateProcessing - the Surface Hub will not be able to send mail or sync its calendar." Validate -WarningOnly -Test "The mailbox $strUpn will not delete meeting comments" -Condition ($calendarProcessing -ne $null -and !$calendarProcessing.DeleteComments) -FailureMsg "DeleteComments - the Surface Hub may be missing some meeting information on the welcome screen and Skype." Validate -WarningOnly -Test "The mailbox $strUpn keeps private meetings private" -Condition ($calendarProcessing -ne $null -and !$calendarProcessing.RemovePrivateProperty) -FailureMsg "RemovePrivateProperty - the Surface Hub will make show private meetings." Validate -Test "The mailbox $strUpn keeps meeting subjects" -Condition ($calendarProcessing -ne $null -and !$calendarProcessing.DeleteSubject) -FailureMsg "DeleteSubject - the Surface Hub will not keep meeting subject information." @@ -1346,10 +1346,10 @@ if ($casMailbox) # Check the default access level $orgSettings = Get-ActiveSyncOrganizationSettings $strDefaultAccessLevel = $orgSettings.DefaultAccessLevel -Validate -Test "ActiveSync devices are allowed" -Condition ($strDefaultAccessLevel -eq 'Allow') -FailureMsg "DeviceType Windows Mail is accessible - devices are not allowed by default - the surface hub will not be able to send mail or sync its calendar." +Validate -Test "ActiveSync devices are allowed" -Condition ($strDefaultAccessLevel -eq 'Allow') -FailureMsg "DeviceType Windows Mail is accessible - devices are not allowed by default - the surface hub will not be able to send mail or sync its calendar." # Check if there exists a device access rule that bans the device type Windows Mail -$blockingRules = Get-ActiveSyncDeviceAccessRule | where {($_.AccessLevel -eq 'Block' -or $_.AccessLevel -eq 'Quarantine') -and $_.Characteristic -eq 'DeviceType'-and $_.QueryString -eq 'WindowsMail'} +$blockingRules = Get-ActiveSyncDeviceAccessRule | where {($_.AccessLevel -eq 'Block' -or $_.AccessLevel -eq 'Quarantine') -and $_.Characteristic -eq 'DeviceType'-and $_.QueryString -eq 'WindowsMail'} Validate -Test "Windows mail devices are not blocked or quarantined" -Condition ($blockingRules -eq $null -or $blockingRules.Length -eq 0) -FailureMsg "DeviceType Windows Mail is accessible - devices are blocked or quaratined - the surface hub will not be able to send mail or sync its calendar." ## End Exchange ## @@ -1390,7 +1390,7 @@ if ($fHasOnline) Validate -Test "There is an online user account for $strUpn" -Condition ($accountOnline -ne $null) -FailureMsg "Could not find a Microsoft Online account for this user even though some services are online" if ($accountOnline) { - Validate -Test "The password for $strUpn will not expire" -Condition ($accountOnline.PasswordNeverExpires -eq $True) -FailureMsg "PasswordNeverExpires - the admin will need to update the device account's password on the Surface Hub when it expires." + Validate -Test "The password for $strUpn will not expire" -Condition ($accountOnline.PasswordNeverExpires -eq $True) -FailureMsg "PasswordNeverExpires - the admin will need to update the device account's password on the Surface Hub when it expires." if ($fIsSfbOnline -and !$fIsExOnline) { $strLicenseFailureMsg = "Has O365 license - The devices will not be able to use Skype for Business services." @@ -1426,7 +1426,7 @@ if ($fHasOnPrem) Validate -Test "There is a user account for $strOnPremUpn" -Condition ($accountOnprem -ne $null) -FailureMsg "Could not find an Active Directory account for this user" if ($accountOnPrem) { - Validate -WarningOnly -Test "The password for $strOnPremUpn will not expire" -Condition ($accountOnprem.PasswordNeverExpires -eq $True) -FailureMsg "PasswordNeverExpires - the admin will need to update the device account's password on the Surface Hub when it expires." + Validate -WarningOnly -Test "The password for $strOnPremUpn will not expire" -Condition ($accountOnprem.PasswordNeverExpires -eq $True) -FailureMsg "PasswordNeverExpires - the admin will need to update the device account's password on the Surface Hub when it expires." Validate -Test "$strOnPremUpn is enabled" -Condition $accountOnPrem.Enabled -FailureMsg "AccountEnabled - this device account will not sign in" } } @@ -1529,7 +1529,7 @@ else ## Collect account data ## Write-Host "----------- Enter info for the account to enable -----------." -foregroundcolor "magenta" -$strRoomUri=Read-Host 'Please enter the UPN of the account you are enabling (e.g. confroom@surfacehub.microsoft.com)' +$strRoomUri=Read-Host 'Please enter the UPN of the account you are enabling (e.g. confroom@surfacehub.microsoft.com)' if ([System.String]::IsNullOrEmpty($strRoomUri)) { @@ -1586,7 +1586,7 @@ if ($online) } else { - $strRegPool = $strRegPool[0].Substring($strRegPool[0].IndexOf(':') + 1) + $strRegPool = $strRegPool[0].Substring($strRegPool[0].IndexOf(':') + 1) } } diff --git a/devices/surface-hub/hybrid-deployment-surface-hub-device-accounts.md b/devices/surface-hub/hybrid-deployment-surface-hub-device-accounts.md index 482dce9fa8..fae114b8da 100644 --- a/devices/surface-hub/hybrid-deployment-surface-hub-device-accounts.md +++ b/devices/surface-hub/hybrid-deployment-surface-hub-device-accounts.md @@ -40,10 +40,10 @@ Use this procedure if you use Exchange on-prem. Open your on-prem Exchange Management Shell with administrator permissions, and run this cmdlet. ```ps1 - Enable-Mailbox 'HUB01@contoso.com' -RemoteRoutingAddress 'HUB01@contoso.com' -Room + Enable-Mailbox 'HUB01@contoso.com' -RemoteRoutingAddress 'HUB01@contoso.com' -Room ``` -5. Connect to Microsoft Exchange Online and set some properties for the account in Office 365. +4. Connect to Microsoft Exchange Online and set some properties for the account in Office 365. Start a remote PowerShell session on a PC and connect to Microsoft Exchange. Be sure you have the right permissions set to run the associated cmdlets. @@ -51,9 +51,9 @@ Use this procedure if you use Exchange on-prem. ```ps1 Set-ExecutionPolicy Unrestricted - $org='contoso.com' + $org='contoso.com' $cred=Get-Credential $admin@$org - $sess= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 'https://outlook.office365.com/ps1-liveid/' -Credential $cred -Authentication Basic -AllowRedirection + $sess= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri 'https://outlook.office365.com/ps1-liveid/' -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $sess ``` @@ -70,7 +70,7 @@ Use this procedure if you use Exchange on-prem. Once you have a compatible policy, then you will need to apply the policy to the device account. ```ps1 - Set-CASMailbox 'HUB01@contoso.com' -ActiveSyncMailboxPolicy $easPolicy + Set-CASMailbox 'HUB01@contoso.com' -ActiveSyncMailboxPolicy $easPolicy ``` 6. Set Exchange properties. @@ -78,8 +78,8 @@ Use this procedure if you use Exchange on-prem. Setting Exchange properties on the device account to improve the meeting experience. You can see which properties need to be set in the [Exchange properties](exchange-properties-for-surface-hub-device-accounts.md) section. ```ps1 - Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AutomateProcessing AutoAccept -AddOrganizerToSubject $false –AllowConflicts $false –DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false - Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AddAdditionalResponse $true -AdditionalResponse 'This is a Surface Hub room!' + Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AutomateProcessing AutoAccept -AddOrganizerToSubject $false –AllowConflicts $false –DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false + Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AddAdditionalResponse $true -AdditionalResponse 'This is a Surface Hub room!' ``` 7. Connect to Azure AD. @@ -99,9 +99,9 @@ Use this procedure if you use Exchange on-prem. Once you list out the SKUs, you can add a license using the `Set-MsolUserLicense` cmdlet. In this case, `$strLicense` is the SKU code that you see (for example, *contoso:STANDARDPACK*). ```ps1 - Set-MsolUser -UserPrincipalName 'HUB01@contoso.com' -UsageLocation 'US' + Set-MsolUser -UserPrincipalName 'HUB01@contoso.com' -UsageLocation 'US' Get-MsolAccountSku - Set-MsolUserLicense -UserPrincipalName 'HUB01@contoso.com' -AddLicenses $strLicense + Set-MsolUserLicense -UserPrincipalName 'HUB01@contoso.com' -AddLicenses $strLicense ``` 9. Enable the device account with Skype for Business. @@ -127,7 +127,7 @@ Use this procedure if you use Exchange on-prem. ```ps1 Enable-CsMeetingRoom -Identity $rm -RegistrarPool - 'sippoolbl20a04.infra.lync.com' -SipAddressType EmailAddress + 'sippoolbl20a04.infra.lync.com&' -SipAddressType EmailAddress ``` If you aren't sure what value to use for the `RegistrarPool` parameter in your environment, you can get the value from an existing Skype for Business user using this cmdlet: @@ -164,7 +164,7 @@ Use this procedure if you use Exchange online. ```ps1 Set-ExecutionPolicy Unrestricted - $org='contoso.microsoft.com + $org='contoso.microsoft.com' $cred=Get-Credential $admin@$org $sess= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/ps1-liveid/ -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $sess @@ -177,13 +177,13 @@ Use this procedure if you use Exchange online. If you're changing an existing resource mailbox: ```ps1 - Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) + Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) ``` If you’re creating a new resource mailbox: ```ps1 - New-Mailbox -MicrosoftOnlineServicesID 'HUB01@contoso.com' -Alias HUB01 -Name "Hub-01" -Room -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) + New-Mailbox -MicrosoftOnlineServicesID 'HUB01@contoso.com' -Alias HUB01 -Name "Hub-01" -Room -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) ``` 3. Create Exchange ActiveSync policy. @@ -202,9 +202,9 @@ Use this procedure if you use Exchange online. ```ps1 Set-Mailbox $acctUpn -Type Regular - Set-CASMailbox 'HUB01@contoso.com' -ActiveSyncMailboxPolicy $easPolicy - Set-Mailbox 'HUB01@contoso.com' -Type Room - Set-Mailbox 'HUB01@contoso.com' -RoomMailboxPassword $credNewAccount.Password -EnableRoomMailboxAccount $true + Set-CASMailbox 'HUB01@contoso.com' -ActiveSyncMailboxPolicy $easPolicy + Set-Mailbox 'HUB01@contoso.com' -Type Room + Set-Mailbox 'HUB01@contoso.com' -RoomMailboxPassword $credNewAccount.Password -EnableRoomMailboxAccount $true ``` 4. Set Exchange properties. @@ -212,8 +212,8 @@ Use this procedure if you use Exchange online. Various Exchange properties must be set on the device account to improve the meeting experience. You can see which properties need to be set in the [Exchange properties](exchange-properties-for-surface-hub-device-accounts.md) section. ```ps1 - Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AutomateProcessing AutoAccept -AddOrganizerToSubject $false –AllowConflicts $false –DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false - Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AddAdditionalResponse $true -AdditionalResponse "This is a Surface Hub room!" + Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AutomateProcessing AutoAccept -AddOrganizerToSubject $false –AllowConflicts $false –DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false + Set-CalendarProcessing -Identity 'HUB01@contoso.com' -AddAdditionalResponse $true -AdditionalResponse "This is a Surface Hub room!" ``` 5. Add email address for your on-prem domain account. @@ -256,9 +256,9 @@ Use this procedure if you use Exchange online. Once you list out the SKUs, you can add a license using the `Set-MsolUserLicense` cmdlet. In this case, `$strLicense` is the SKU code that you see (for example, *contoso:STANDARDPACK*). ```ps1 - Set-MsolUser -UserPrincipalName 'HUB01@contoso.com' -UsageLocation 'US' + Set-MsolUser -UserPrincipalName 'HUB01@contoso.com' -UsageLocation 'US' Get-MsolAccountSku - Set-MsolUserLicense -UserPrincipalName 'HUB01@contoso.com' -AddLicenses $strLicense + Set-MsolUserLicense -UserPrincipalName 'HUB01@contoso.com' -AddLicenses $strLicense ``` 9. Enable the device account with Skype for Business. @@ -285,7 +285,7 @@ Use this procedure if you use Exchange online. ```ps1 Enable-CsMeetingRoom -Identity $rm -RegistrarPool - 'sippoolbl20a04.infra.lync.com' -SipAddressType EmailAddress + 'sippoolbl20a04.infra.lync.com' -SipAddressType EmailAddress ``` If you aren't sure what value to use for the `RegistrarPool` parameter in your environment, you can get the value from an existing Skype for Business user using this cmdlet: diff --git a/devices/surface-hub/on-premises-deployment-surface-hub-device-accounts.md b/devices/surface-hub/on-premises-deployment-surface-hub-device-accounts.md index 03fc4981b1..678465138b 100644 --- a/devices/surface-hub/on-premises-deployment-surface-hub-device-accounts.md +++ b/devices/surface-hub/on-premises-deployment-surface-hub-device-accounts.md @@ -25,7 +25,7 @@ If you have a single-forest on-premises deployment with Microsoft Exchange 2013 ```PowerShell Set-ExecutionPolicy Unrestricted - $org='contoso.microsoft.com' + $org='contoso.microsoft.com' $cred=Get-Credential $admin@$org $sessExchange = New-PSSession -ConfigurationName microsoft.exchange -Credential $cred -AllowRedirection -Authentication Kerberos -ConnectionUri "http://$strExchangeServer/powershell" -WarningAction SilentlyContinue $sessLync = New-PSSession -Credential $cred -ConnectionURI "https://$strLyncFQDN/OcsPowershell" -AllowRedirection -WarningAction SilentlyContinue @@ -38,7 +38,7 @@ If you have a single-forest on-premises deployment with Microsoft Exchange 2013 If you're changing an existing resource mailbox: ```PowerShell - Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) + Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) ``` If you’re creating a new resource mailbox: diff --git a/devices/surface-hub/online-deployment-surface-hub-device-accounts.md b/devices/surface-hub/online-deployment-surface-hub-device-accounts.md index f3d9942ade..87f72ef2f2 100644 --- a/devices/surface-hub/online-deployment-surface-hub-device-accounts.md +++ b/devices/surface-hub/online-deployment-surface-hub-device-accounts.md @@ -23,7 +23,7 @@ If you have a pure, online (O365) deployment, then you can [use the provided Pow ```PowerShell Set-ExecutionPolicy Unrestricted - $org='contoso.microsoft.com' + $org='contoso.microsoft.com' $cred=Get-Credential $admin@$org $sess= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $sess @@ -34,7 +34,7 @@ If you have a pure, online (O365) deployment, then you can [use the provided Pow If you're changing an existing resource mailbox: ```PowerShell - Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) + Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String -AsPlainText -Force) ``` If you’re creating a new resource mailbox: