Merge remote-tracking branch 'refs/remotes/origin/sh-7610972'

This commit is contained in:
Trudy Hakala
2016-06-16 11:48:38 -07:00
4 changed files with 48 additions and 48 deletions

View File

@ -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 &#39;Choose the number for the SKU you want to pick&#39;
$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(&#39;@&#39;))
if (!$strUpn.Contains('@'))
{
CleanupAndFail "$strUpn is not a valid email address"
}
@ -1192,7 +1192,7 @@ if ($fHasOnline)
}
catch
{
# This really shouldn&#39;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(&#39;\&#39;))
$strLinkedUser = $strLinkedAccount.substring($strLinkedAccount.IndexOf(&#39;\&#39;) + 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,&#39;.&#39;)
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 &#39;AutoAccept&#39;) -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 &#39;Allow&#39;) -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 &#39;Block&#39; -or $_.AccessLevel -eq &#39;Quarantine&#39;) -and $_.Characteristic -eq &#39;DeviceType&#39;-and $_.QueryString -eq &#39;WindowsMail&#39;}
$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&#39;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&#39;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 &#39;Please enter the UPN of the account you are enabling (e.g. confroom@surfacehub.microsoft.com)&#39;
$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(&#39;:&#39;) + 1)
$strRegPool = $strRegPool[0].Substring($strRegPool[0].IndexOf(':') + 1)
}
}

View File

@ -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 &#39;HUB01@contoso.com&#39; -RemoteRoutingAddress &#39;HUB01@contoso.com&#39; -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=&#39;contoso.com&#39;
$org='contoso.com'
$cred=Get-Credential $admin@$org
$sess= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri &#39;https://outlook.office365.com/ps1-liveid/&#39; -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 &#39;HUB01@contoso.com&#39; -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 &#39;HUB01@contoso.com&#39; -AutomateProcessing AutoAccept -AddOrganizerToSubject $false AllowConflicts $false DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false
Set-CalendarProcessing -Identity &#39;HUB01@contoso.com&#39; -AddAdditionalResponse $true -AdditionalResponse &#39;This is a Surface Hub room!&#39;
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 &#39;HUB01@contoso.com&#39; -UsageLocation &#39;US&#39;
Set-MsolUser -UserPrincipalName 'HUB01@contoso.com' -UsageLocation 'US'
Get-MsolAccountSku
Set-MsolUserLicense -UserPrincipalName &#39;HUB01@contoso.com&#39; -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
&#39;sippoolbl20a04.infra.lync.com&#39; -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=&#39;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 &#39;HUB01&#39; -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
```
If youre creating a new resource mailbox:
```ps1
New-Mailbox -MicrosoftOnlineServicesID &#39;HUB01@contoso.com&#39; -Alias HUB01 -Name "Hub-01" -Room -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
New-Mailbox -MicrosoftOnlineServicesID 'HUB01@contoso.com' -Alias HUB01 -Name "Hub-01" -Room -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -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 &#39;HUB01@contoso.com&#39; -ActiveSyncMailboxPolicy $easPolicy
Set-Mailbox &#39;HUB01@contoso.com&#39; -Type Room
Set-Mailbox &#39;HUB01@contoso.com&#39; -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 &#39;HUB01@contoso.com&#39; -AutomateProcessing AutoAccept -AddOrganizerToSubject $false AllowConflicts $false DeleteComments $false -DeleteSubject $false -RemovePrivateProperty $false
Set-CalendarProcessing -Identity &#39;HUB01@contoso.com&#39; -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 &#39;HUB01@contoso.com&#39; -UsageLocation &#39;US&#39;
Set-MsolUser -UserPrincipalName 'HUB01@contoso.com' -UsageLocation 'US'
Get-MsolAccountSku
Set-MsolUserLicense -UserPrincipalName &#39;HUB01@contoso.com&#39; -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
&#39;sippoolbl20a04.infra.lync.com&#39; -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:

View File

@ -25,7 +25,7 @@ If you have a single-forest on-premises deployment with Microsoft Exchange 2013
```PowerShell
Set-ExecutionPolicy Unrestricted
$org=&#39;contoso.microsoft.com&#39;
$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 &#39;HUB01&#39; -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
```
If youre creating a new resource mailbox:

View File

@ -23,7 +23,7 @@ If you have a pure, online (O365) deployment, then you can [use the provided Pow
```PowerShell
Set-ExecutionPolicy Unrestricted
$org=&#39;contoso.microsoft.com&#39;
$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 &#39;HUB01&#39; -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
Set-Mailbox -Identity 'HUB01' -EnableRoomMailboxAccount $true -RoomMailboxPassword (ConvertTo-SecureString -String <password> -AsPlainText -Force)
```
If youre creating a new resource mailbox: