Consolidate laboratory network and client maintenance policies

This commit is contained in:
alexrg committed 2026-10-14 21:49:32 -06:00
1 parent bfa520dec8
commit 5cda541e3d
20 files changed
+534 -107

No files matched your search

+3 -1
View File
@@ -4,6 +4,8 @@ param(
[string]$CollectorFqdn = "$env:COMPUTERNAME.$env:USERDNSDOMAIN",
[string]$ComputerOuDn = 'OU=Laboratorio,DC=lci,DC=lasalle,DC=mx',
[string]$MonitoringRoot = 'C:\ProgramData\SGU\Monitoring',
[ValidateRange(5,1440)]
[int]$InventoryIntervalMinutes = 60,
[ValidateRange(30, 730)]
[int]$RetentionDays = 183
)
@@ -114,7 +116,7 @@ if ($PSCmdlet.ShouldProcess($env:COMPUTERNAME, 'Install the SGU domain monitorin
"-NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File `"$maintenanceScript`" " +
"-MonitoringRoot `"$MonitoringRoot`" -ComputerOuDn `"$ComputerOuDn`" -RetentionDays $RetentionDays -InventoryOnly")
$inventoryTrigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1) `
-RepetitionInterval (New-TimeSpan -Minutes 5) `
-RepetitionInterval (New-TimeSpan -Minutes $InventoryIntervalMinutes) `
-RepetitionDuration (New-TimeSpan -Days 3650)
$taskSettings = New-ScheduledTaskSettingsSet -StartWhenAvailable `
-ExecutionTimeLimit (New-TimeSpan -Minutes 10) -RestartCount 2 `