Skip to content

Commit

Permalink
Merge pull request #63 from G3NSVRV/patch-3
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
ltamaster authored Sep 10, 2020
2 parents 487b5f0 + 8ba586d commit bb7fdce
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For Kerberos
## Node definition example


```
```xml
<node name="Hostname"
description="Windows Server"
tags="windows"
Expand Down Expand Up @@ -74,7 +74,7 @@ Further information [here](https://github.com/diyan/pywinrm#valid-transport-opti
### CredSSP

To use CredSSP authentication you need these optional dependencies
```
```bash
pip install pywinrm[credssp]
```

Expand Down Expand Up @@ -103,15 +103,15 @@ In resume, to use Kerberos authentication the following requirements are needed:
### Install Basic dependencies
#### for Debian/Ubuntu/etc:

```
```bash
$ sudo apt-get install python-dev libkrb5-dev
$ pip install pywinrm[kerberos]
$ pip install requests-kerberos
$ pip install pexpect
```

#### for RHEL/CentOS/etc:
```
```bash
$ sudo yum install python-devel krb5-devel krb5-workstation requests-kerberos
$ pip install pywinrm[kerberos]
$ pip install requests-kerberos
Expand All @@ -128,7 +128,7 @@ Don't use the file copier to transfer big files, the performance is not the best

This plugin include a connectivity test script that can be used as a Workflow Step or it could be called it directly, for example:

```
```bash
python contents/winrm-check.py --username <username> --hostname <windows-server> --password <password>
```

Expand All @@ -145,7 +145,7 @@ In some cases, a script can return a warning which will produce that the step fa
So if you need to control errors, you will need to find the way to capture the exit code of your commands inside the script, for example:

* Option 1: check the last exit code
```
```powershell
# some code with error
get-services
Expand All @@ -158,7 +158,7 @@ if ($lastExitCode -ne "0") {

* Option 2: add a try/catch block

```
```powershell
try {
# some code with error
get-services
Expand All @@ -173,28 +173,27 @@ catch {

If you get the following error:

```
```log
module object has no attribute 'SSL_ST_INIT'
```

Update your verion of PyOpenSSL:
Update your version of PyOpenSSL:

```
```bash
python -m easy_install --upgrade pyOpenSSL
```
If you get the following error after run a PowerShell Script:
```
```log
Failed: NonZeroResultCode: [WinRM Python] Result code: 1
```
Please check first if you have disable the ExecutionPolicy on PowerShell
```
Get-ExecutionPolicy
```
If the result is Restricted, please run the following command:
Configure the Script Invocation Script as:
```powershell
powershell.exe -ExecutionPolicy Bypass
```
Or you can make it permanent on the server executing on the Remote Node in powershell:
```powershell
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```


## Docker example
Check these [instructions](docker/README.md) for docker test

0 comments on commit bb7fdce

Please sign in to comment.