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"
}

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

Landis Attendant Console Install

Attempting to setup a test tenant with access to Landis Attendant Console, and was getting errors around granting access to the tenant. The ...