Microsoft Surface Hub 2 SmCamera User Manual
Page 520
![background image](/files/873833/content/doc520.png)
PrintAction
"Configuring password not to expire..."
Start-Sleep
-s
20
try
{
Set-AdUser
$mailbox.UserPrincipalName
-PasswordNeverExpires
$true
-
Enabled
$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 = $strLyncFQDN
$Error.Clear()
$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..."
Start-Sleep
-s
10
$Error.Clear()
try
{
Enable-CsMeetingRoom
-Identity
$credNewAccount.UserName
-RegistrarPool
$strRegPool
-SipAddressType
EmailAddress
}
catch { }
if
($Error)
{
$status[
"Skype for Business Account Setup"
] =
"Failed to setup the Skype
for Business meeting room - you can run EnableSfb.ps1 to try again."
$Error.Clear();