Conditions | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from pywinexe.api import cmd as run_cmd |
||
11 | def run(self, host, password, username='Administrator'): |
||
12 | """ |
||
13 | Setup WinRM on a remote node |
||
14 | """ |
||
15 | cmds = [ |
||
16 | "winrm set winrm/config/service/auth @{Basic=\"false\"}", |
||
17 | "winrm set winrm/config/service @{AllowUnencrypted=\"false\"}" |
||
18 | ] |
||
19 | out = [ |
||
20 | run_cmd( |
||
21 | cmd, |
||
22 | args=[], |
||
23 | user=username, |
||
24 | password=password, |
||
25 | host=host) for cmd in cmds] |
||
26 | return out |
||
27 |