Home Forums Programming Powershell Can't get powershell script to run as Agent Job - runs from CMD RE: Can't get powershell script to run as Agent Job - runs from CMD

  • Found the problem and fixed, but I don't know hows or whys. When I added the code to the Job Step by selecting Open and browsing to the .ps1 I got this funny question mark thing in the code.

    ...Rename-Item ?Newname{($_.basename + (get-date -format

    Changed that to -Newname and it works as expected.