[Crate Enhancement]Run Powershell via RMM - Store device_id in org variable
J
Jonquil yellow Landfowl
Run Powershell via RMM workflows currently extend execution time listing every client org id and every device under a client.
we're already referencing ORG.preferred_dc but it has to look up the device_id referencing that hostname and pulls ALL devices (not even filtering to servers - windows) meaning it takes longer on clients with more devices.
It would be better to utilize this time to store the id in ORG.preferred_dc_device_id that way subsequent runs would not have to pull the devices for a lookup.
AFFECTED WORKFLOWS:
[Rewst Master v3] On-Prem: Run PowerShell on Org Domain Controller-Actual-No Really-This One
and
[REWST - TASK] Run Powershell via RMM
ISSUE:
The current version of the n-central path:
ORG.preferred_dc defined> list all devices for the client to try and find the dc device_id> list all org ids for the client> run powershell
REMEDIATION PATH:
Do this instead:
first run:
ORG.preferred_dc defined> ORG.preferred_dc_device_id not found> look up and store id in the org variable ORG.preferred_dc_device_id > continue
subsequent runs:
ORG.preferred_dc defined> ORG.preferred_dc_device_id defined from previous run> direct powershell execution
Log In