fix(deploy): copy exchange_monitor.settings.example to ProgramData (v1.6.4)

Example settings were published to NETLOGON but omitted from Deploy-DomainMonitors file list, so Copy-Item from ProgramData failed on fresh installs.
This commit is contained in:
PTah
2026-05-22 15:00:30 +10:00
parent 872df98a2c
commit cdf563cbe9
4 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -28,7 +28,8 @@ $PsExe = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
$ExchangeFiles = @(
'Exchange-MailSecurity.ps1',
'Notify-Common.ps1',
'Install-DomainMonitors.ps1'
'Install-DomainMonitors.ps1',
'exchange_monitor.settings.example.ps1'
)
function Write-DeployLog {
+8 -3
View File
@@ -114,9 +114,14 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "\\B26\NETLOGON\RDP-logi
### 3. Локальные настройки (один раз)
```powershell
Copy-Item "C:\ProgramData\RDP-login-monitor\exchange_monitor.settings.example.ps1" `
"C:\ProgramData\RDP-login-monitor\exchange_monitor.settings.ps1"
notepad C:\ProgramData\RDP-login-monitor\exchange_monitor.settings.ps1
# После Deploy v1.6.4+ образец лежит в ProgramData; иначе — с NETLOGON:
$ex = 'C:\ProgramData\RDP-login-monitor'
$src = Join-Path $ex 'exchange_monitor.settings.example.ps1'
if (-not (Test-Path -LiteralPath $src)) {
$src = '\\B26\NETLOGON\RDP-login-monitor\exchange_monitor.settings.example.ps1'
}
Copy-Item -LiteralPath $src -Destination (Join-Path $ex 'exchange_monitor.settings.ps1')
notepad (Join-Path $ex 'exchange_monitor.settings.ps1')
```
Задайте:
+1 -1
View File
@@ -25,7 +25,7 @@ $ErrorActionPreference = 'Stop'
# КОНФИГУРАЦИЯ
# ============================================
$ScriptVersion = '1.6.3'
$ScriptVersion = '1.6.4'
$script:InstallRoot = [System.IO.Path]::GetFullPath("$env:ProgramData\RDP-login-monitor")
$script:CanonicalScriptName = 'Exchange-MailSecurity.ps1'
$LogFile = Join-Path $script:InstallRoot 'Logs\exchange_mail_security.log'
+1 -1
View File
@@ -1 +1 @@
1.6.3
1.6.4