-
Notifications
You must be signed in to change notification settings - Fork 13
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
PSWSMan very slow on Mac #45
Comments
Unfortunately I don't have too much knowledge on this type of performance work but I do have some recommendations for you to try:
Most likely this is a problem with the OMI library and there's some performance problem somewhere in the code. Unfortunately this isn't something I've really focused on myself and I wouldn't be surprised if it's a fundamental problem with how the client is set up. If you do find anything interesting I am happy to have a look at it further and see if we can find a solution. |
Thanks @jborean93 - any suggestions on what to look for in the logs? |
@jborean93 - any hints at all would be greatly appreciated |
The only thing I would look for is to analyze the times it takes to send and receive a response. If it's getting a response in a reasonable time but the session is still slow then something might be up in the code. If it's taking a long time to receive an actual response then it's more likely to be a network problem as OMI is just waiting for a response. Unfortunately this is difficult to fully analyze as it's traffic over HTTPS and everything will be encrypted with Wireshark. The OMI logs should contain a bit more information though. |
I'm not very familiar with these logs so I'm not really sure, but it doesn't seem like there is any specific slowdown over the network. I'm attaching a log file here. If there is anything at all you can see it would be greatly helpful. We would love to switch to Mac for development but this is a blocker for us, as it takes 90 seconds every time we want to start debugging the software. Thanks for all of your work on this. Really great stuff. |
It'll take some time to look into this sorry. If you don't need this for interactive purposes, may I suggest https://github.com/jborean93/pypsrp. It may take a bit of work to implement modern auth but it is definitely possible to run commands on the Exchange PSSession like you would with PowerShell. It's a hell of a lot more stable than the OMI code as well. |
Thanks @jborean93 It's not interactive but we are locked into using PowerShell code for this so I'm not clear on how we'd use the pypsrp library. |
Any new thoughts on this @jborean93 ? Thanks very much - I really appreciate all of your help with this. |
Hey @jborean93 would you be willing to investigate and try to fix this on a paid basis? |
SUMMARY
When running on a Mac, creating a PSSession for ExchangeOnline takes 50 to 75 seconds, whereas the same code, from the same machine, with the same version of PowerShell (7.1.4), from a Windows VM takes 10 to 15 seconds.
LIBMI VERSION
PSWSMan 2.2.1
libcrypto.1.1.dylib
OS / ENVIRONMENT
Mac OS Big Sur
Sample Code
Any ideas what could be slowing it down?
The text was updated successfully, but these errors were encountered: