Hey Thank you so much for your help and guidance, it worked.
My sample resource.yaml file looks like following:
root@rundeckVM1:/home/azureaman/test2-project# cat resources.yaml
node4:
nodename: rundeck3
hostname: IP-address
description: 'azurevm-rundeck3'
tags: "agent, node4, rundeck3"
username: azureuser
osFamily: Linux rundeck
node5:
hostname: "IP-address"
tags: "windows"
node-executor: "WinRMPython"
file-copier: "WinRMPython"
username: "user35"
winrm-authtype: "basic"
winrm-port: "5985"
winrm-shell: "powershell"
winrm-password-storage-path: "keys/home/keypath"
1) Then I had to define my user & password at keys/home/keypath using "Key Storage" option from settings.
2) on remote node I have to run following commands to setup the winrm.
winrm get winrm/config
winrm set winrm/config/service/Auth '@{Basic="true"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}'
winrm set winrm/config/service/Auth '@{Kerberos="false"}'
winrm enumerate winrm/config/listener
winrm configSDDL default -->>> then give full permission or read/execute permission to my user "user35"
3) then reboot the server to enable these configurations.
4) then I tested the configuration from command option & following script.
import winrm
session = winrm.Session('xx.xx.xx.xx', auth=('your_windows_username','windows_password'))
result = session.run_ps("hostname")
print(result.std_out)
followed your suggestion and following links
--->> initially python command was not running on rundeck as my Rundeck server has python3 which is required for this winrm plugin.
I overcame that problem by linking following in /usr/bin by using ln command.
python -> python3.8
python-config -> python3.8-config
x86_64-linux-gnu-python3-config -> x86_64-linux-gnu-python3.8-config