Microsoft Surface Hub 2 SmCamera User Manual

Page 543

Advertising
background image

}
catch
{
PrintError

"Some dependencies are missing"

PrintError

"Please install the Windows PowerShell Module for Lync

Online. For more information go to
https://www.microsoft.com/download/details.aspx?id=39366"

PrintError

"Please install the Azure Active Directory module for

PowerShell from https://go.microsoft.com/fwlink/p/?linkid=236297"

CleanupAndFail
}
}

else

{
$strRegPool =

Read-Host

"Enter the FQDN of your Skype for Business

Registrar Pool"

}

## 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. [email protected])'

if

([System.String]::IsNullOrEmpty($strRoomUri))

{
CleanupAndFail

"Please enter all of the requested data to continue."

exit

1

}

Write-Host

"--------------------------------------------------------------."

-foregroundcolor

"magenta"

## Sign in to remote powershell for exchange and lync online ##

Write-Host

"`n------------------ Establishing connection ----------------

-."

-foregroundcolor

"magenta"

$credAdmin=

Get-Credential

-Message

"Enter credentials of a Skype for

Business admin"

if

(!$credadmin)

{
CleanupAndFail(

"Valid admin credentials are required to create and

prepare the account."

);

}

Write-Host

"Connecting to remote sessions. This can occasionally take a

while - please do not enter input..."

try

{

if

($online)

{
$sessCS =

New-CsOnlineSession

-Credential

$credAdmin

}

else

Advertising