Skip to content

Instantly share code, notes, and snippets.

@jdhitsolutions
jdhitsolutions / Send-ToPSGridview.ps1
Created January 15, 2019 18:02
A PowerShell Core function designed to send output to an instance of Out-Gridview in Windows PowerShell. This requires you to be running a full graphical desktop like Windows 10.
#requires -version 6.1
Function Send-ToPSGridView {
<#
.SYNOPSIS
Send objects to Out-Gridview in Windows PowerShell
.DESCRIPTION
This command is intended as a workaround for PowerShell Core running on a Windows platform, presumably Windows 10. PowerShell Core does not support all of the .NET Framework which means some commands like Out-Gridview are not supported. However, on a Windows desktop you are most likely running Windows PowerShell side by side with PowerShell Core. This command is designed to take objects from a PowerShell expression and send it to an instance of Windows PowerShell running Out-Gridview. You can specify a title and pass objects back to your PowerShell Core session. Note that passed objects will be deserialized versions of the original objects.
.PARAMETER Title