Friday, 2 August 2019

"Open File" Dialog

Migrating uses between Skype for Business and Skype Online lately and have been migrating in batches/pilot groups.

Having gotten sick of upding the filename or file location in the powershell script, i went searching and found a nice article on how to create a open file dialog box.

https://ilovepowershell.com/2017/03/08/how-to-open-a-directory-chooser-window-with-powershell/

I'm sure there is a better/easier to complete, but this worked for me.
++++++++++++++++++++++++++++++++++++++++++++
$connect = Read-host "Connect to O365 Skype Online: [Y|N]?"
if($connect -like "Y")
{
Import-Module SkypeOnlineConnector
$userCredential = Get-Credential
$sfbSession = New-CsOnlineSession -Credential $userCredential
Import-PSSession $sfbSession
}
if($userCredential.UserName -eq $nul)
{
write-host "No Crediential Set for move" -ForegroundColor Red

else
{
write-host "connected user"
}

$openChooser = New-Object -TypeName System.Windows.Forms.OpenFileDialog
$openChooser.ShowDialog()
$fileimport = import-csv $openChooser.FileName
foreach($i in $fileimport)
{
write-host -ForegroundColor Cyan $i.displayname -NoNewline
write-host " is currently being migrated"
}

++++++++++++++++++++++++++++++++++++++++++++

Teams Tracing/Logging

This post is to outline the logging/tracing items for a MS Teams environment, most of the tracing will be from the Teams Client/Web App/etc....