examples/01-Hello.ps1

# 01 - Hello: the smallest window. Close it to continue.
if (-not (Get-Command Show-NativeWebView -ErrorAction Ignore)) { Import-Module NativeWebView -ErrorAction Stop }

Show-NativeWebView -Title "Hello" -Width 480 -Height 320 -Html @'
<!doctype html>
<html><head><style>
  body { font-family: Verdana, 'Segoe UI', Arial, sans-serif; color: #454545; display: grid; place-items: center;
         height: 100vh; margin: 0; background: #F9F9F9; }
  h1 { color: #154363; font-size: 24px; letter-spacing: 1px; }
</style></head>
<body><h1>Hello from PowerShell</h1></body></html>
'@

Write-Host "The window was closed."