So I have a .bat file that turns on a Computer. When I run it with cmd outside of Jenkins it works. The given IP Adress is reachable. But when I run the .bat file within Jenkins the IP adress seems to be not reachable.
Jenkins is installed locally. I tested it on the same machine where Jenkins is installed.
Is the user you run as when you login and run the bat file the same user as the Jenkins controller/agent where the job is running is running as? Can you share any error messages?
Running Jenkins as Local System is not recommended. In would recommend setting up a user for Jenkins to run as. This user will need to have Logon As Service permissions. You can see how to do that here: Windows
Sometimes the Local System account can cause issues.
Thanks @slide_o_mix!
I could sign in with a User now.
One thing was necessary that the documentation didn’t mentioned.
The user the Service uses, needs to have a windows password.
I’ll make another reply if everything went smoothly.