このシリーズの他の記事は、オラクル・クラウドの個人ブログ一覧 からご覧いただけます。
初めに
このブログでは、PowerShellスクリプトを活用して、Tera Termの自動インストールを実現する方法を紹介します。特に、クラウド環境での効率的なセットアップを目指す方や、Computeインスタンスの作成時にTera Termを自動的にインストールしたい方にとって、一助となれば幸いです。
動作確認済環境
OS: Windows Server 2019 Standard Edition (VM)
Tera Term バージョン: 5.4.0
ステップ
- インストーラのダウンロード
- インストール開始(
/VERYSILENT
) - インストーラの削除(オプション)
#ps1_sysnative
# Define the URL of the Tera Term installer
$Version = "5.4.0"
$InstallerFile = "teraterm-$Version.exe"
$InstallerUrl = "https://github.com/TeraTermProject/teraterm/releases/download/v$Version/" + $InstallerFile
# Define the path where you want to save the installer
$InstallerPath = Join-Path $env:TEMP $InstallerFile
# Download the installer
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri $InstallerUrl -OutFile $InstallerPath
# Execute the installer silently
Start-Process -Wait -FilePath $InstallerPath -Args "/VERYSILENT"
# Clean up the installer after installation (optional)
Remove-Item $InstallerPath
- OCI cloud-initスクリプトで使用する場合は、スクリプトの先頭に
#ps1_sysnative
を追加する必要があります。 - 手動で上記のスクリプトを実行した場合は、Tera Term のショートカットがデスクトップに自動的に作成されますが、OCI Cloud-init で実行した場合は、ショートカットが自動で作成されない現象が確認されています。
以上
関連記事
OCI Cloud-initスクリプト