Rodolphe Charlot22372
1 discussion post
Hi,
I'm having an issue with the task scheduler.
When I'm running the following command in an admin powershel, it does what I want :
"C:\Program Files (x86)\DisplayFusion\DisplayFusionCommand.exe" -monitorloadprofile '1280'
But I can't find a way to run it inside the task scheduler.
What I've tried :
- Run it as a system task
- Run it as a user task
- Added Max authorizations
But when the task is executed, it does nothing and doesn't stop. No errors, nothing.
Here is the powershell script I've used to create the first task, but I edited the task a lot after.
$Trigger= New-ScheduledTaskTrigger -AtLogon # Specify the trigger settings
$User= "NT AUTHORITY\SYSTEM" # Specify the account to run the script
$Action= New-ScheduledTaskAction -Execute "C:\Program Files (x86)\DisplayFusion\DisplayFusionCommand.exe" -Argument "-monitorloadprofile '1280'" # Specify what program to run and with its parameters
Register-ScheduledTask -TaskName "MonitorGroupMembership" -Trigger $Trigger -User $User -Action $Action -RunLevel Highest # Specify the name of the task
Can you try double quotes around the profile name, instead of single quotes? I know single quotes work in Powershell, but they likely don't work in a Scheduled Task config.