Microsoft Surface Hub 2 SmCamera User Manual

Page 528

Advertising
background image

PasswordNeverExpires

$true

}
catch
{

}

if

($Error)

{
$status[

"Password Expiration Policy"

] =

"Failed to set the password to

never expire"

}

else

{
$status[

"Password Expiration Policy"

] =

"Successfully set the password

to never expire"

}

PrintSuccess

"Completed Exchange configuration"

## Setup Skype for Business. This is somewhat optional and if it fails we
SfbEnable can be used later ##

PrintAction

"Configuring account for Skype for Business."

# Getting registrar pool

$strRegPool =

$null

try

{

$strRegPool = (

Get-CsTenant

).TenantPoolExtension

}
catch {}
$Error.Clear()

if

(![System.String]::IsNullOrEmpty($strRegPool))

{
$strRegPool = $strRegPool.Substring($strRegPool[0].IndexOf(

':'

) + 1)

}

<#
$strRegPoolEntry = Read-Host "Enter a Skype for Business Registrar Pool, or
leave blank to use [$strRegPool]"
if (![System.String]::IsNullOrEmpty($strRegPoolEntry))
{
$strRegPool = $strRegPoolEntry
}
#>

# Try to SfB-enable the account. Note that it may not work right away as the
account needs to propagate to active directory

PrintAction

"Enabling Skype for Business on $strRegPool"

Start-Sleep

-s

10

$Error.Clear()

try

{

Enable-CsMeetingRoom

-Identity

$credNewAccount.UserName

-RegistrarPool

$strRegPool

-SipAddressType

EmailAddress

}
catch { }

Advertising