Skip to content

Instantly share code, notes, and snippets.

function Get-DatePicker
{
[CmdletBinding()]
[OutputType([System.DateTime])]
Param([string]$windowTitle=$null)
Add-type -AssemblyName "System.windows.forms"
$winForm = New-object Windows.Forms.Form
if([string]::IsNullOrEmpty($windowTitle)){
$winForm.Text = "DatePicker Control"