1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows にプリザンターを半自動でセットアップする

Last updated at Posted at 2026-01-05

はじめに

OSSのノーコード・ローコード開発ツール「プリザンター」 Advent Calendar 2025 の 2 つの記事を見て、Windows 環境でも半自動でプリザンターのセットアップができるか試してみました。
SQL Server のインストールに GUI 操作が必要なため、残念ながら完全な自動化はできませんでしたが、PowerShell スクリプトで多くの手順を自動化できました。

前提条件

  • Windows 11 または Windows Server 環境。
  • WinGet がインストールされていること。
  • PowerShell 5.1 以降がインストールされていること。
  • インターネットに接続されていること。
  • 確認したプリザンターのバージョンは 2025/12/18 リリースの 1.4.23.3 です。

各コマンドは管理者権限で実行してください。

今回の例では Hyper-V を使用して仮想マシンを作成し、その中にプリザンターをセットアップします。
クイック作成を使うと Windows 11 Enterprise の仮想マシンが簡単に作成できます。

Create Virtual Machine.png

PS C:\Users\User> [System.Environment]::OSVersion

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.22621.0 Microsoft Windows NT 10.0.22621.0

PS C:\Users\User> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.3880
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.3880
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Windows の機能の有効化

Windows 11 環境の場合

公式マニュアルはこちらです。

「Windows の機能の有効化または無効化」の操作は Enable-WindowsOptionalFeature コマンドレットを使用します。

Enable-WindowsOptionalFeature -FeatureName @(
  'IIS-WebServerRole'
  'IIS-WebServer'
  'IIS-CommonHttpFeatures'
  'IIS-ApplicationDevelopment'
  'IIS-Security'
  'IIS-RequestFiltering'
  'IIS-NetFxExtensibility45'
  'IIS-WebServerManagementTools'
  'IIS-StaticContent'
  'IIS-DefaultDocument'
  'IIS-ISAPIFilter'
  'IIS-ISAPIExtensions'
  'IIS-ASPNET45'
  'IIS-ManagementConsole'
  'NetFx4Extended-ASPNET45'
) -Online -All

また、FAQ には WebDAV 発行が有効だと新規作成はできるが、更新・削除ができないとあります。
必要に応じて次のスクリプトを実行してください。

Disable-WindowsOptionalFeature -FeatureName @(
  'IIS-WebDAV'
) -Online
スクリプトの作成方法

手動で設定した後の端末で Get-WindowsOptionalFeature を実行すると、有効化されている機能の一覧が取得できます。
次の出力例では既定で有効になっている機能が含まれています。
これを参考に必要な機能を有効化するスクリプトを作成しました。

Get-WindowsOptionalFeature -Online | Where-Object -Property State -EQ 'Enabled' | Select-Object -ExpandProperty FeatureName
Windows-Defender-Default-Definitions
+ IIS-WebServerRole
+ IIS-WebServer
+ IIS-CommonHttpFeatures
+ IIS-ApplicationDevelopment
+ IIS-Security
+ IIS-RequestFiltering
+ IIS-NetFxExtensibility45
+ IIS-WebServerManagementTools
WorkFolders-Client
WCF-Services45
WCF-TCP-PortSharing45
+ IIS-StaticContent
+ IIS-DefaultDocument
+ IIS-ISAPIFilter
+ IIS-ISAPIExtensions
+ IIS-ASPNET45
+ IIS-ManagementConsole
MediaPlayback
WindowsMediaPlayer
SmbDirect
Printing-PrintToPDFServices-Features
SearchEngine-Client-Package
Microsoft-RemoteDesktopConnection
Printing-Foundation-Features
Printing-Foundation-InternetPrinting-Client
MSRDC-Infrastructure
NetFx4-AdvSrvs
+ NetFx4Extended-ASPNET45

Windows Server 環境の場合

公式マニュアルは こちらです。
動作確認した環境は Windows Server 2025 です。

「役割と機能の追加」の操作には Install-WindowsFeature コマンドレットを使用します。

Install-WindowsFeature -Name @(
  'Web-Server'
  'Web-WebServer'
  'Web-Common-Http'
  'Web-Http-Errors'
  'Web-Dir-Browsing'
  'Web-Default-Doc'
  'Web-Static-Content'
  'Web-Security'
  'Web-Filtering'
  'Web-Performance'
  'Web-Stat-Compression'
  'Web-Health'
  'Web-Http-Logging'
  'Web-Mgmt-Tools'
  'Web-Mgmt-Console'
)

IIS の設定

IIS を有効にすると WebAdministration Module が利用可能になります。
IIS マネージャの操作はこのモジュールを使用します。

Import-Module -Name 'WebAdministration'
$installDir = 'C:\web\pleasanter'
Set-ItemProperty -Path 'IIS:\AppPools\DefaultAppPool' -Name 'processModel.idleTimeoutAction' -Value 'Suspend'
Set-ItemProperty -Path 'IIS:\AppPools\DefaultAppPool' -Name 'managedRuntimeVersion' -Value ''
Set-ItemProperty -Path 'IIS:\Sites\Default Web Site\' -Name 'physicalPath' -Value "$installDir\Implem.Pleasanter"

SQL Server 2025 Express のインストール

公式マニュアルはこちらです。

現時点 (2026-01-05) で、WinGet には SQL Server 2025 Express が提供されていません。
そのため、ダウンロードリンクから直接インストーラを取得します。
Microsoft SQL Server 2022 Express は存在するので、しばらくすると WinGet にも追加されるでしょう。
ただし、WinGet のインストール時にオプションの指定ができるかは未確認です。

インストールメディアへの URL を直接指定してダウンローダを実行します。
引数を渡すと、最初の選択画面を飛ばしてメディアのダウンロード画面が表示されます。

$downloader = $env:TEMP | Join-Path -ChildPath 'SQL2025-SSEI-Expr.exe'
$request = @{
  Uri     = 'https://download.microsoft.com/download/7ab8f535-7eb8-4b16-82eb-eca0fa2d38f3/SQL2025-SSEI-Expr.exe'
  OutFile = $downloader
}
Invoke-WebRequest @request -PassThru -UseBasicParsing
# & $downloader /? を実行するとオプションが確認できます。
& $downloader /ACTION=Download /LANGUAGE=ja-JP /VERBOSE

次に、インストーラを実行して SQL Server 2025 Express をインストールします。
SETUP.EXE のパスは、ダウンロードしたフォルダに応じて変更してください。
構成ファイル (ConfigulationFile.ini) は、2025 になった SQL Server をプリザンター向けにセットアップの記事を参考に作成してください。

$env:USERPROFILE | Join-Path -ChildPath 'Downloads' | Set-Location
$installer = '.\SQLEXPR_x64_JPN\SETUP.EXE'
& $installer /ACTION=Install /UIMODE=Normal
# 手動でインストールする場合はここで終了です。
$ConfigurationFile = Get-Location | Join-Path -ChildPath 'ConfigurationFile.ini'
$password = Read-Host -Prompt 'Enter password for SQL Server sa account.' -AsSecureString
$arguments = @(
  "/CONFIGURATIONFILE=`"$ConfigurationFile`""
  "/SQLSYSADMINACCOUNTS=`"${env:COMPUTERNAME}\${env:USERNAME}`""
  "/SAPWD=`"$([System.Net.NetworkCredential]::new([string]::Empty, $password).Password)`""
  '/IACCEPTSQLSERVERLICENSETERMS'
  '/SUPPRESSPAIDEDITIONNOTICE="True"'
  '/QUIET'
)
# & $installer /? を実行するとオプションが確認できます。
& $installer @arguments

SQL Server 2025 構成マネージャの操作は WMI 経由で行います。

  • WMI プロバイダに関するドキュメントは こちらです。
  • WMI 名前空間 root\Microsoft\SqlServer\ComputerManagement17 は SQL Server 2025 用です。SQL Server のバージョンに応じて変更してください。
  • 再起動するサービス名は、インスタンス名に応じて変更してください。既定のインスタンスの場合は MSSQLSERVER です。

SQL Server 2025 Setup.png

$wmi = Get-WmiObject -Class ServerNetworkProtocol -Namespace 'root\Microsoft\SqlServer\ComputerManagement17' |
Where-Object -Property ProtocolName -EQ 'Tcp'
$wmi.SetEnable()
net.exe stop MSSQLSERVER
net.exe start MSSQLSERVER

SQL Server Management Studio のインストール

公式マニュアルはこちらです。

WinGet を使って SQL Server Management Studio (SSMS) 22 をインストールします。

winget.exe install --id 'Microsoft.SQLServerManagementStudio.22' --exact --silent --accept-package-agreements --accept-source-agreements

.NET のインストール

公式マニュアルはこちらです。

WinGet を使って .NET 8.0 の SDK と Hosting Bundle をインストールします。

winget.exe install --id 'Microsoft.DotNet.SDK.8' --exact --silent --accept-package-agreements --accept-source-agreements
winget.exe install --id 'Microsoft.DotNet.HostingBundle.8' --exact --silent --accept-package-agreements --accept-source-agreements

プリザンターのインストール (インストーラ使用)

公式マニュアルの記載に従い、インストーラを使用してプリザンターをインストールします。

dotnet.exe tool install --global Implem.PleasanterSetup
pleasanter-setup.exe

おわりに

以上で、Windows 環境へのプリザンターのセットアップは完了です。
公式マニュアルを参考にしながら、環境に合わせて設定を調整してください。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?