Microsoft Surface Hub 2 SmCamera User Manual

Page 533

Advertising
background image

do

{
$strHasOnPrem = (

Read-Host

"Do you have an on-premises Active

Directory (Y/N) (No if your domain services are hosted entirely
online)"

).ToUpper()

}

while

($strHasOnPrem -ne

"Y"

-and

$strHasOnPrem -ne

"N"

)

$fHasOnPrem = $strHasOnPrem.Equals(

"Y"

)

}

$fHasOnline =

$false

if

($fSfbIsOnline

-or

$fExIsOnline)

{
$fHasOnline =

$true

}

if

($fSfbIsOnline)

{

try

{

Import-Module

SkypeOnlineConnector

}
catch
{
CleanupAndFail

"To verify Skype for Business in online tenants you

need the Lync Online Connector module from
https://www.microsoft.com/download/details.aspx?id=39366"

}
}

else

{
$credSfb = (

Get-Credential

-Message

"Please enter Skype for Business

admin credentials"

)

}

if

($fHasOnline)

{
$credSfb = $credEx

try

{

Import-Module

MSOnline

}
catch
{
CleanupAndFail

"To verify accounts in online tenants you need the

Azure Active Directory module for PowerShell from
https://go.microsoft.com/fwlink/p/?linkid=236297"

}
}

PrintAction

"Connecting to Exchange Powershell Session..."

[System.Management.Automation.Runspaces.AuthenticationMechanism] $authType =
[System.Management.Automation.Runspaces.AuthenticationMechanism]::Kerberos

if

($fExIsOnline)

{
$authType =
[System.Management.Automation.Runspaces.AuthenticationMechanism]::Basic
}

Advertising