Microsoft Surface Hub 2 SmCamera User Manual
Page 544
![background image](/files/873833/content/doc544.png)
{
$sessCS =
New-PSSession
-Credential
$credAdmin
-ConnectionURI
"https://$strRegPool/OcsPowershell"
-AllowRedirection -WarningAction
SilentlyContinue
}
}
catch
{
CleanupAndFail(
"Failed to connect to Skype for Business server. Please
check your credentials and try again. Error message: $_"
)
}
Import-PSSession
$sessCS
-AllowClobber
Write-Host
"--------------------------------------------------------------."
-foregroundcolor
"magenta"
# Getting registrar pool
if
($online)
{
try
{
$strRegPool =
$null
;
$strRegPool = (
Get-CsTenant
).RegistrarPool
} catch {}
if
($Error)
{
$Error.Clear();
$strRegPool =
""
;
Write-Host
"We failed to lookup your Skype for Business Registrar
Pool, but you can still enter it manually"
}
else
{
$strRegPool = $strRegPool[0].Substring($strRegPool[0].IndexOf(
':'
) +
1)
}
}
$Error.Clear()
try
{
Enable-CsMeetingRoom
-Identity
$strRoomUri
-RegistrarPool
$strRegPool
-
SipAddressType
EmailAddress
}
catch {}
ExitIfError(
"Failed to setup Skype for Business meeting room"
)
PrintSuccess
"Successfully enabled $strRoomUri as a Skype for Business
meeting room"
Cleanup