Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command-line interface #42

Closed
wants to merge 19 commits into from
Closed

command-line interface #42

wants to merge 19 commits into from

Conversation

jakobadam
Copy link

Hi

Thanks for the work on pywinrm. I'm using it in several projects.

This pull request contains a WinRM CLI using pywinrm. I need it for doing quick WinRM interactions. In general it works, except that multiline cmd commands doesn't work:

$ ./winrm -p password Administrator@10.0.0.10 <<\EOF
echo 1
echo 2
EOF
1

Do you have any idea why?

Note: executing multiline scripts using powershell work:

$ ./winrm -t ps -p password Administrator@10.0.0.10 <<\EOF
echo 1
echo 2
EOF
1
2

Other working examples are in the code.

kind regards,
Jakob

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8587b44 on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 28ed2ea on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 210e7dd on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

coveralls commented Nov 20, 2014

Coverage Status

Coverage remained the same at 61.357% when pulling 210e7dd on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling a6d86d4 on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.62%) when pulling fe58106 on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.62%) when pulling 70c644a on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.63%) to 50.73% when pulling 95a2ce5 on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-10.75%) to 50.6% when pulling 667eda8 on jakobadam:cli into 3da6bec on diyan:master.

@jakobadam
Copy link
Author

@diyan Do you see this pull request happening?

@diyan
Copy link
Owner

diyan commented Jan 28, 2015

@jakobadam Thank you for this feature. I will do a code review and merge your pull request.

Unfortunately I can not tell you exact deadlines for this.

In any way I'm agree that pywinrm should have command line interface.

@jakobadam
Copy link
Author

Sounds good. I'll see if I can add some tests.

@alexpilotti
Copy link
Contributor

What about including support for X509 authentication in the CLI?

Here's the pywinrm CLI that we currently use, including both password and X509 auth:

https://github.com/cloudbase/pywinrm/blob/master/wsmancmd.py

@coveralls
Copy link

Coverage Status

Coverage increased (+1.45%) to 62.81% when pulling 7d45596 on jakobadam:cli into 3da6bec on diyan:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.45%) to 62.81% when pulling 7d45596 on jakobadam:cli into 3da6bec on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.45%) to 62.81% when pulling b41afb4 on jakobadam:cli into 3da6bec on diyan:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.45%) to 62.81% when pulling b41afb4 on jakobadam:cli into 3da6bec on diyan:master.

joranvar and others added 6 commits February 22, 2015 16:31
This way, cli calls will also benefit from feedback-as-we-go.
This way, the streams will be set only once, bound to the Protocol
object, instead of to each run command.
This is more in line with the way it is called.
@badcure
Copy link
Collaborator

badcure commented Jun 11, 2019

@jakobadam I know it has been a while, but do you mind rebasing? After that I can look at this PR

@badcure badcure added the needs a rebase/merge Awaiting a merge/rebase from master label Jun 11, 2019
@jakobadam
Copy link
Author

Hi Brian. It's been a really long time since I used this. Feel free to reject the PR.

@badcure
Copy link
Collaborator

badcure commented Jun 11, 2019

Thanks, and sorry about that. Closing now.

@badcure badcure closed this Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs a rebase/merge Awaiting a merge/rebase from master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants