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)