From ca75b59fc2c9c964d2096a1713d5f9bc0a63bbda Mon Sep 17 00:00:00 2001 From: Jaap Brasser Date: Fri, 9 Aug 2019 16:59:33 +0200 Subject: [PATCH] Added comment-based help --- .../ConvertTo-Base64GUIExample.ps1 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 b/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 index aaf7785..60aa38c 100644 --- a/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 +++ b/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 @@ -1,4 +1,14 @@ -[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null -$InputBox = [Microsoft.VisualBasic.Interaction]::InputBox("Let's convert this to base64", "Sabrina's App", $null) -$InputBox = [convert]::ToBase64String([char[]]$InputBox) -[Microsoft.VisualBasic.Interaction]::MsgBox($InputBox,0,"Sabrina's App") \ No newline at end of file +function ConvertTo-Base64GUIExample { +<# +.SYNOPSIS +Function to showcase some of the PowerShell GUI capabilities + +.DESCRIPTION +This function contains various examples of using the GUI capabilities of both Windows PowerShell and PowerShell (Core). This is inteded to be used as a reference for those interested in building basic GUIs with PowerShell +#> + + [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null + $InputBox = [Microsoft.VisualBasic.Interaction]::InputBox("Let's convert this to base64", "Sabrina's App", $null) + $InputBox = [convert]::ToBase64String([char[]]$InputBox) + [Microsoft.VisualBasic.Interaction]::MsgBox($InputBox,0,"Sabrina's App") +} \ No newline at end of file