Microsoft Surface Hub 2 SmCamera User Manual
Page 536

CleanupAndFail
"Account exists check failed. Unable to find the mailbox
for $strUpn - please make sure the Exchange account exists on $strExServer"
}
$exchange =
$null
if
(!$fExIsOnline)
{
$exchange =
Get-ExchangeServer
if
(!$exchange
-or
!$exchange.IsE14OrLater)
{
CleanupAndFail
"A compatible exchange server version was not found.
Please use at least exchange 2010."
}
}
$strAlias = $mailbox.UserPrincipalName
$strDisplayName = $mailbox.DisplayName
$strLinkedAccount = $strLinkedDomain = $strLinkedUser = $strLinkedServer =
$null
$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)
$strLinkedServer =
Read-Host
"What is the domain controller for the
$strLinkedDomain"
$credLinkedDomain = (
Get-Credential
-Message
"Please provide credentials
for $strLinkedDomain"
)
}
Write-Host
Write-Host
Write-Host
PrintAction
"Performing verification checks on $strDisplayName..."
$Global:iTotalFailures = 0
$global:iTotalWarnings = 0
$Global:iTotalPasses = 0
function
Validate()
{
Param
(
[string]$Test,