$window = New-Object Windows.Window $window.Title = $window.Content = "Hello World of Powershell and WPF together." $window.SizeToContent = "WidthAndHeight" $null = $window.ShowDialog()