フォロー

引数版>< 

# showrtf.ps1
Param (
[Parameter(Mandatory=$true)]
[string]$filepath
)
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$form = New-Object System.Windows.Forms.Form
$form.Text = "Show rtf "+$filepath
$richTextBox = New-Object System.Windows.Forms.RichTextBox
$richTextBox.Dock = "Fill"
$richTextBox.LoadFile($filepath, [System.Windows.Forms.RichTextBoxStreamType]::RichText)
$form.Controls.Add($richTextBox)
[System.Windows.Forms.Application]::Run($form)

ログインして会話に参加
:realtek:

思考の /dev/null