TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Powershell scripts no longer working

    General Discussion
    2
    3
    6
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kellanistK
      kellanist
      last edited by

      Hey @Russ! Long time!

      Reformatted my HD, reinstalled Windows 10, then installed triggercmd and reconnected it as the same machine. I copied over the .triggercmd folder and all the scripts to the new environment. Everything comes up in the GUI properly. When I try to kick off a PowerShell command, it doesnt run. Nothing happens at all. No error. When I run the script outside triggercmd, it works without issue. The only thing in the script is a couple of Start-Process and Stop-Process commands.

      When I look at the history of the command, it shows error 1.

      I'm a full admin. Not sure why it's failing me when when it worked perfectly until now.

      Anywhere that I can check logs to see what may be going on? Any ideas on what could be happening?

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @kellanist
        last edited by

        @kellanist, can you show me your command? I wonder if you need to prefix it with powershell or something, like:

        powershell c:\scripts\yourscript.ps1
        

        Also, please check your debug.log log for more output. I might give the reason it's failing and returning error code 1.

        Also, please confirm you're on the latest version of the agent, which is 1.0.46 as of today.

        Russell VanderMey

        kellanistK 1 Reply Last reply Reply Quote 0
        • kellanistK
          kellanist @Russ
          last edited by

          @Russ

          This is the command Im using which has been working for years until I reformatted my machine:

          powershell "C:\Users\MYUSER\Documents\TriggerCMDScripts\StartWork.ps1"
          

          I checked the debug.log and I dont see any timestamps in there and when I click on the scripts, its not logging anything. Its like the button is doing nothing. I deleted the debug.log file and when it recreated, it didnt log anything other than the app starting and me opening the GUI editor.

          Running the newest agent 1.0.46.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post