Account verification script, Account verification, Script – Microsoft Surface Hub 2 SmCamera User Manual

Page 531: To make sure they ran correctly

Advertising
background image

This script validates the previously created device account on Surface Hub and Surface
Hub 2S, no matter which method was used to create it. This script is basically pass/fail. If
one of the test errors out, it will show a detailed error message, but if all tests pass, the
end result will be a summary report. For example, you might see:

Console

Details of specific settings will not be shown.

PowerShell

}

else

{
PrintError

"The account could not be created"

}

Account verification script

15 tests executed
0 failures
2 warnings
15 passed

# SHAccountValidate.ps1

$Error.Clear()
$ErrorActionPreference =

"Stop"

# Cleans up set state such as remote powershell sessions

function

Cleanup()

{

if

($sessEx)

{

Remove-PSSession

$sessEx

}

if

($sessSfb)

{

Remove-PSSession

$sessSfb

}
}

function

PrintError($strMsg)

{

Write-Host

$strMsg

-foregroundcolor

"red"

}

function

PrintSuccess($strMsg)

Advertising