dndaughtery (7/26/2016)
Running the powershell script manually did uncover some issues with the powerschell script. I had gotten a copy of this from another developer who had used directories on his laptop that I didn't have access to. I corrected them and now I can run the powershell script manually with no errors. I now have my execute process task as follows and still getting the following error:[Execute Process Task] Error: In Executing "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-ExecutionPolicy Unrestricted -File"C:\Powershell Scripts\Get-00253_ReSubFiles.ps1"" at "C:\Windows\System32\WindowsPowerShell\v1.0", The process exit code was "1" while the expected was "0".
EXEcute process task settings:
Executable: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -ExecutionPolicy Unrestricted -Command "C:\Powershell Scripts\Get-00253_ReSubFiles.ps1"
WorkingDirectory: C:\Windows\System32\WindowsPowerShell\v1.0
Any ideas where I'm going wrong?
If you try putting the command line from the error message, ie, this
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-ExecutionPolicy Unrestricted -File"C:\Powershell Scripts\Get-00253_ReSubFiles.ps1"" at "C:\Windows\System32\WindowsPowerShell\v1.0"
into a .bat file and running it, does it work?
It's been a while, but I seem to remember the EP task 'helpfully' adding its own quotes around some of the items, and in the process creating a syntax error. Just an idea.
--Edit: fixed typo
If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.