Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using PowerShell to create scheduled tasks on my local machine, the Scheduled Task runs a PowerShell script to PowerShell remote into a server and copy files.

When I run the Scheduled task using the option: - Run when user is logged on or not - the task runs and straight away deletes the task - any ideas what's going on, when I use my account when I am logged on it works as expected

share|improve this question
2  
When using option "..." what ? Also provide the Powershell command you use to create the Scheduled Task –  krisFR Mar 7 at 13:26
    
are you copying over mapped drives ? If so, add a net use and or test-path command inside the script to fix. Or alternatively leave script as is and check the Run only when user is logged on button so that your script can find mapped drives even while you are logged off. –  Knuckle-Dragger Mar 20 at 17:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.