Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. 1>I am trying to write a python function with which i can enter the remote machine(windows 2008 r2 sever) that also has powershell and pass the computer name, user name, passwd as parameter to the python function that are required to enter remote machine and also the command to execute on the remote machine
  2. 2>Take session of the remote machine.
  3. 3>run a power shell script on the remote machine
  4.  
  5. import subprocess
  6. subprocess.call(["C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement