Files
HostAvailabilityMonitor/installers/powershell/Install-Both.ps1
T

34 lines
1.4 KiB
PowerShell

param(
[string]$PackageRoot = (Split-Path -Parent $PSScriptRoot),
[string]$BaseInstallPath = "C:\Program Files\JR IT Services\BizTalk Endpoint Monitor",
[string]$BaseConfigPath = "C:\ProgramData\JR IT Services\BizTalk Endpoint Monitor",
[switch]$RegisterEventSources,
[switch]$CreateBackup
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$hostScript = Join-Path $PSScriptRoot 'Install-HostAvailabilityMonitor.ps1'
$genScript = Join-Path $PSScriptRoot 'Install-BizTalkMonitorConfigGenerator.ps1'
& $genScript `
-PackageRoot $PackageRoot `
-InstallPath (Join-Path $BaseInstallPath 'BizTalkMonitorConfigGenerator') `
-ConfigRoot (Join-Path $BaseConfigPath 'BizTalkMonitorConfigGenerator') `
-RegisterEventSource:$RegisterEventSources `
-CreateBackup:$CreateBackup
& $hostScript `
-PackageRoot $PackageRoot `
-InstallPath (Join-Path $BaseInstallPath 'HostAvailabilityMonitor') `
-ConfigRoot (Join-Path $BaseConfigPath 'HostAvailabilityMonitor') `
-RegisterEventSource:$RegisterEventSources `
-CreateBackup:$CreateBackup
Write-Host "[INFO] Both applications have been installed."
Write-Host "[INFO] Suggested next steps:"
Write-Host "[INFO] 1. Adjust generator settings in ProgramData."
Write-Host "[INFO] 2. Run generator once to create generated-monitor-appsettings.json."
Write-Host "[INFO] 3. Start HostAvailabilityMonitor with the generated JSON path."