Function to Mounting ISO in windows with File-Open Browser-Popup with Powershell

This is very simple function that you can add to your ISE profile that allows a file-open dialog box that looks specifically for ISO files and uses the Mount-DiskImage Command.


Function Mount-ISO {

$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{
    InitialDirectory = [Environment]::GetFolderPath('Desktop')
    Filter = 'ISO-Images (*.ISO)|*.iso'
}

$null = $FileBrowser.ShowDialog()

Mount-DiskImage -ImagePath $FileBrowser.FileName
}