1$action = New-ScheduledTaskAction `
2 -WorkingDirectory 'C:\Users\{winUser.user}' `
3 -Execute `
4 'C:\Users\{winUser.user}\AppData\Local\Programs\attune\resources\app.asar.unpacked\py\attune-server'
5
6
7$task = New-ScheduledTask -Action $action `
8
9Register-ScheduledTask 'attune-server' -InputObject $task `
10 -User "{winUser.user}" `
11 -Password "{winUser.password}"
12
13Start-ScheduledTask 'attune-server'
14
15Start-Sleep -Seconds 5
16
17# Check that its running
18Get-Process -Name "attune-server"