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

Add support for enumeration (WQL)? #146

Open
knalli opened this issue Oct 12, 2021 · 10 comments
Open

Add support for enumeration (WQL)? #146

knalli opened this issue Oct 12, 2021 · 10 comments

Comments

@knalli
Copy link

knalli commented Oct 12, 2021

Hi,

as fas as I understand the used techniques correctly, the service interface WinRm is the central location for binding the entities respective service endpoints.

I'm unsure how easy it would be adding support for enumeration which is useful for executing WQL queries. Currently, the workaround via a PS command works. However, this requires the startup/instance of a (running) shell which is expensive (both runtime duration and actual cpu performance on the host). Am I too naive and there are some hidden difficulties except for the given five commands?

I've already started experimenting with this but struggling to gather the different api/soap/tokens correctly.

Sidenote: For an actual high-level/end-user solution, there should be a wrapper which merges the result. See also in WinRb/WinRM.

Do you think this a useful addition?

@knalli knalli changed the title Add support for integration (WQL)? Add support for enumeration (WQL)? Oct 12, 2021
@knalli
Copy link
Author

knalli commented Oct 14, 2021

So far, I have a solution and testing it at the moment. Would like to make add this as a contribution, but maybe we should discuss some details. Preview here: https://github.com/hlsolutions/winrm4j/tree/feature/add_enumerate

@AndrewDodd42
Copy link

@knalli I would like to use your work on WQL support and add it into my fork of winrm4j. Would you object to me preparing PRs from your code and submitting them to the origin project?

@knalli
Copy link
Author

knalli commented Aug 23, 2022

@AndrewDodd42 No, of course not. I'd wished more attention here, actually. :) I have waited for some feedback, but feel free. If you have some questions, feel free to come up.

We have this running for some time and are quite happy with it. The instrumentation of the underlaying CXF may need some improvements..

@AndrewDodd42
Copy link

@knalli Great and it's good to know that the WQL code is working well. I'll get started with creating PRs for the smaller fixes that are in your fork and then look at the WQL changes.

I'll probably be back to ask more questions as I'm pretty new to GitHub. What is the best way to collaborate on these changes? Adding comments to this PR?

@AndrewDodd42
Copy link

@knalli I've created a series of PRs that package up your smaller changes and modify them slightly to get them working against the latest upstream. I've also created a draft PR for the enumeration feature; this appears to work but I want to test it some more tomorrow.

The next stage after that is to attempt to create a PR that depends on both the enumeration and codepage changes and changes buildClient() to work with both of them.

@knalli
Copy link
Author

knalli commented Aug 24, 2022

Nice to hear. Just ping me.

@chinaxushi
Copy link

Has it been merged?

@AndrewDodd42
Copy link

Has it been merged?

No, I'm not sure the original maintainers are active any longer.

I've put together the WQL changes that knalli made and a few other fixes and improvements in my fork at:- https://github.com/AndrewDodd42/winrm4j

@knalli
Copy link
Author

knalli commented Jan 17, 2023

Yeah, having also waiting for this. Besides this one, there is also an outstanding review/rework for a compatibility with Jakarta EE (at least since releases of Spring Boot v3 and Apache CXF v4). However, I'm not so in the CXF stuff and I must stopped end of last year. Do you have already progress in this topic?

Maybe we should think about a fork of the additional features?

@chinaxushi
Copy link

Has it been merged?

No, I'm not sure the original maintainers are active any longer.

I've put together the WQL changes that knalli made and a few other fixes and improvements in my fork at:- https://github.com/AndrewDodd42/winrm4j

Is it normal when I do the WQL query? The data here seems to return null, but according to the log, the number of returned items seems to be correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants