From 3b1aee70166f8ee524b7a42d1314d8dc1fbf4550 Mon Sep 17 00:00:00 2001 From: kyle Date: Wed, 7 Oct 2026 15:48:27 +0000 Subject: [PATCH] Update scheduled task to use Powershell 7 Todo: add logic to check for and install Powershell 7 --- collectors/veeam/Install-VeeamCollector.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collectors/veeam/Install-VeeamCollector.ps1 b/collectors/veeam/Install-VeeamCollector.ps1 index 0225eb4..14e276b 100644 --- a/collectors/veeam/Install-VeeamCollector.ps1 +++ b/collectors/veeam/Install-VeeamCollector.ps1 @@ -59,7 +59,7 @@ $scriptPath = Join-Path $InstallDir 'Send-VeeamBackupStatus.ps1' Copy-Item -Path (Join-Path $PSScriptRoot 'Send-VeeamBackupStatus.ps1') -Destination $scriptPath -Force Unblock-File -Path $scriptPath -$action = New-ScheduledTaskAction -Execute 'powershell.exe' ` +$action = New-ScheduledTaskAction -Execute 'pwsh.exe' ` -Argument "-NoProfile -NonInteractive -ExecutionPolicy Bypass -File `"$scriptPath`"" $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1) ` -RepetitionInterval (New-TimeSpan -Minutes $IntervalMinutes)