[Jenkins] Windows RDP Script

def command = """net user USER PASSWORT /add""" def proc = command.execute() // Call *execute* on the string proc.waitFor() //...

Kod:
def command = """net user USER PASSWORT /add"""
def proc = command.execute()                 // Call *execute* on the string
proc.waitFor()                               // Wait for the command to finish

// Obtain status and output
println "return code: ${ proc.exitValue()}"
println "stderr: ${proc.err.text}"
println "stdout: ${proc.in.text}" // *out* from the external program

Kod:
def command = """net localgroup Administrators USER /add"""
def proc = command.execute()                 // Call *execute* on the string
proc.waitFor()                               // Wait for the command to finish

// Obtain status and output
println "return code: ${ proc.exitValue()}"
println "stderr: ${proc.err.text}"
println "stdout: ${proc.in.text}" // *out* from the external program is *in* for groovy
 
131,910Konular
3,272,546Mesajlar
316,522Kullanıcılar
aehghfwSon Üye
Üst Alt