You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running Windows 2008 virtual machine in my desktop and try running following python code to get process details running in virtual windows server. however it end with connection refuse error message. I'm new to coding and need help in debugging the code. Tested connection using winrm and it worked, however using pypsrp module unable to establish connection with server.
Server IP address : 192.168.0.5 UserName : Administrator
Python Code:
from pypsrp.powershell import PowerShell, RunSpacePool
from pypsrp.wsman import WSMan
with RunspacePool(wsman) as pool:
ps=PowerShell(pool)
ps.add_cmdlet("get-process".add_cmtlet("select-object").add_argument("Name")
output = ps.invoke()
print(output)
Output:
[win Error 10061] No connection could be made because the target machine actively refused it.
any changes need to made in virtual windows machine ?
The text was updated successfully, but these errors were encountered:
I'm running Windows 2008 virtual machine in my desktop and try running following python code to get process details running in virtual windows server. however it end with connection refuse error message. I'm new to coding and need help in debugging the code. Tested connection using winrm and it worked, however using pypsrp module unable to establish connection with server.
Server IP address : 192.168.0.5 UserName : Administrator
Python Code:
from pypsrp.powershell import PowerShell, RunSpacePool
from pypsrp.wsman import WSMan
wsman - WSMan("192.168.0.5", username="Administrator", Password="******", auth="kerberos", cert_validation=False)
with RunspacePool(wsman) as pool:
ps=PowerShell(pool)
ps.add_cmdlet("get-process".add_cmtlet("select-object").add_argument("Name")
output = ps.invoke()
print(output)
Output:
[win Error 10061] No connection could be made because the target machine actively refused it.
any changes need to made in virtual windows machine ?
The text was updated successfully, but these errors were encountered: