Updated to .NET Framework 4.7.2 due to platform limitations, added email cc, bcc and some fixes.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
param(
|
||||
[string]$PackageRoot = (Split-Path -Parent $PSScriptRoot),
|
||||
[string]$InstallPath = "C:\Program Files\JR IT Services\BizTalkMonitorConfigGenerator",
|
||||
[string]$ConfigRoot = "C:\ProgramData\JR IT Services\BizTalkMonitorConfigGenerator",
|
||||
[switch]$RegisterEventSource,
|
||||
[switch]$CreateBackup
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$repoScripts = Join-Path (Split-Path -Parent (Split-Path -Parent $PSScriptRoot)) 'scripts'
|
||||
$generatorSource = Join-Path $PackageRoot 'generator'
|
||||
if (-not (Test-Path -LiteralPath $generatorSource)) {
|
||||
$generatorSource = Join-Path (Split-Path -Parent $PackageRoot) 'generator'
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $generatorSource)) {
|
||||
throw "Generator source folder not found below package root: $PackageRoot"
|
||||
}
|
||||
|
||||
& (Join-Path $repoScripts 'install-generator-on-server.ps1') `
|
||||
-SourcePath $generatorSource `
|
||||
-InstallPath $InstallPath `
|
||||
-RegisterEventSource:$RegisterEventSource `
|
||||
-CreateBackup:$CreateBackup
|
||||
|
||||
New-Item -Path $ConfigRoot -ItemType Directory -Force | Out-Null
|
||||
$configFile = Join-Path $ConfigRoot 'generator-settings.json'
|
||||
$defaultConfig = Join-Path $InstallPath 'generator-settings.json'
|
||||
if ((Test-Path -LiteralPath $defaultConfig) -and (-not (Test-Path -LiteralPath $configFile))) {
|
||||
Copy-Item -Path $defaultConfig -Destination $configFile -Force
|
||||
}
|
||||
Write-Host "[INFO] BizTalkMonitorConfigGenerator installed to $InstallPath"
|
||||
Write-Host "[INFO] Config location: $configFile"
|
||||
Reference in New Issue
Block a user