Microsoft Surface Hub 2 SmCamera User Manual

Page 66

Advertising
background image

Write-Host




$elapsedTime = $(

get-date

) - $StartElapsedTime


$totalTime =

"{0:HH:mm:ss}"

-f

([datetime]$elapsedTime.Ticks)

Write-Host

"Processing took $totalTime."

-ForegroundColor

Green

Write-Host

Write-Host


$answer =

read-host

-prompt

"Do you want to export results to a CSV file?

[y/N]"

If

($answer.ToLower() -eq

'y'

)


{

try

{


$SaveMyFile =

Get-SaveFilePath

#Use Get-SaveFilePath

function to prompt for filepath information


$Report |

Sort-Object

UPN |

Export-CSV

-Path

$SaveMyFile[1]

-NoTypeInformation


Write-Host

"Results Saved."

-ForegroundColor

green


}

catch {

Write-Host

"Unable to save CSV"

-ForegroundColor

red


}

}


Write-Host

Write-host

"Note: MgGraph and ExchangeOnline connections were not

disconnected. Use Disconnect-ExchangeOnline and Disconnect-MgGraph if
needed."

-ForegroundColor

yellow

Write-Host

Write-Host

"Done"

-ForegroundColor

Green

Advertising