New answers tagged reporting
I ended up moving the script to a folder in the C: root and then running the script as the SYSTEM user. It grabs the currently logged on users when it runs so I no longer need it to run as those users. Been working great since I got it working and my inventory is building itself.
Have you tried running it like this: start "" %systemroot%\System32\windowspowerShell\v1.0\powershell.exe -exec bypass -noprofile -windowstyle hidden -file "C:\Users\%LogonUser%\Scripts\CallHome.ps1"
You can also check Run whether user is logged on or not on the General tab of the task properties. In this mode the program is started hidden. A problem could be that you have to specify the user's password when setting up the task.
I think of two possibilities which you can try: Create a service user which has the user right to run batch jobs and log on as a service, schedule the task as that user wether it is logged on or not. This works and I use it frequently. Use the start-process cmdlet. I believe it is capable of doing what you want but can't test myself right now (on iphone). ...
Top 50 recent answers are included