Execution of a job by WinRM
WinRM is a protocol that allows remote administration of a Windows server. The use of job by WinRM allows batch and PowerShell commands to be run on remote servers without the need to install the agent.
The WinRM plugin must be installed.
To work, I had to join the server where Jenkins is installed on the domain.
From the Jenkins home page, create a new project by clicking New Item 1 .

Name the job 1 , select Build a free-style project 2 and click OK 3 .

Give a description 1 to the project then click on Build 2 .

Click the Add a step to build 1 button and select WinRM Client 2 .

Enter the DNS name of the remote server 1 and click Add / Jenkins 2 to configure credentials.

Enter the identifier 1 and password 2 allowing the connection to the remote server. Click Add 3 to save them.

Select the identifiers created. In the field Command 2 enter the command executed and click Save 3 .

Now that the job is created, click on Start Build 1 .

Once it is executed, display the console output 1 .

The console output displays the result of the ipconfig command. You can also see at the beginning the connection to the remote server by WinRM.
