This is causing control center v2022.9 to close abruptly

Support and discussion forums for the Plugins4Automate Office365 for ConnectWise plugin.
Post Reply
rspaulding
Posts: 7
Joined: Tue Dec 04, 2018 11:26 pm
5

This is causing control center v2022.9 to close abruptly

Post by rspaulding »

On one single client, the rest seem to work correctly upon disabling MFA.
Normally, I would just dust it off since it is one client, but unfortunately I purchased this plugin specifically for the single client I am having an issue with.
This client has over 3000+ Office365 users.
When scanning for "Azure AD", it completes.
When adding "Exchange" OR "Exchange Groups", it seems to chug along for about 10 minutes then abrupty aborts and physically closes my automate control center desktop instance.
I have debug on, but cannot see the error quick enough prior to it closing.
I have attempted multiple machines as the host, same results.
Is there a LOG location to help me diagnose why this may be happening? Either inside Automate OR on the SCANNER machine defined in the MSOnline Config?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: This is causing control center v2022.9 to close abruptly

Post by Cubert »

How we do this is we take a system that is online and fairly resent OS and we pass down to it several PowerShell scripts to execute and return data back to us. For size reasons we have to break the data down into smaller chunks so we have create several scripts to get sections of data back to Automate through the agent.

Automate has placed a 2MB limit on all data returned from an agent. This is not our limits but the limit set forth by the agents own directives. They are hardwired and can not change.

For this reason we break down what should be one big data dump in to many smaller dumps in effort to stay below this threshold.

So, 3000 plus users in a single client may just be the top limit of the amount for data a given function can manage.

How to determine if this is the case?

If its going to happen, it will happen in the exchange portion as that is where most of the big data lies.

Look for scripts to be located on the agent at the following:
  • %windir%\temp\Office365\ExchangeGroups.ps1
  • %windir%\temp\Office365\ExchangeUsers.ps1
  • %windir%\temp\Office365\ExchangeMBSize.ps1
  • %windir%\temp\Office365\ExchangeGroupMembers.ps1
  • %windir%\temp\Office365\Get-ExchangeUserAlias.ps1
These are the POSH scripts used to capture data and return it to Automate. You can manually run any of these scripts and it should return you a large text dump. Copy and paste that dump into a notepad file and see how big it is when saved. If anyone of these returns over a 2 MB file then that is your culprit.


Here is how we execute code on the end agent: (replace {0} - {3} with actual values for clients account and script path to execute.)

Code: Select all

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ImportSystemModules  -ExecutionPolicy Bypass -File {0} -Office365Username {1} -Office365Password {2} -ClientID {3} 
This also means that you can visit the agents command logs in the Control center agent console to see what the last thing it returned from any of these commands before console crash. The fact that the console crashes means we are not picking up the specific exception that is being generated as a result of your issue.

rspaulding
Posts: 7
Joined: Tue Dec 04, 2018 11:26 pm
5

Re: This is causing control center v2022.9 to close abruptly

Post by rspaulding »

Thank you, @Cubert

Post Reply

Return to “Office365 For Automate”