locked
Get-ChildItem RRS feed

  • Question

  • Hi!

    I'm have an PowerShell script running as a scheduled task.
    The script is executed like: -ExecutionPolicy Unrestricted D:\Import\ImportLogs.ps1

    Everything is working great when running the script manually, but when running as an scheduled task, the method
    Get-ChildItem is not working (no result).

    /Jonas


    Sunday, October 15, 2017 2:41 PM

Answers

  • Permissions?  What account are you running it under?  How do you know it is that command that is failing?


    \_(ツ)_/

    • Marked as answer by Ncedia Monday, October 16, 2017 5:32 AM
    Sunday, October 15, 2017 3:10 PM

All replies

  • Permissions?  What account are you running it under?  How do you know it is that command that is failing?


    \_(ツ)_/

    • Marked as answer by Ncedia Monday, October 16, 2017 5:32 AM
    Sunday, October 15, 2017 3:10 PM
  • I was missing file permissions for the service account running the job...

    Thanks!

    • Marked as answer by Ncedia Monday, October 16, 2017 5:32 AM
    • Unmarked as answer by Ncedia Monday, October 16, 2017 5:32 AM
    Monday, October 16, 2017 5:32 AM