One thing to be aware of: Shell.Application relies on an interactive user session. If Pulseway runs the task under SYSTEM (non-interactive), the eject action may silently fail or behave inconsistently. For better reliability in automation, you may want to: - Run the script in the logged-in user context where possible. - Add basic validation to confirm the device was actually ejected. - Consider using CIM Get-CimInstance) instead of Get-WmiObject since WMI is deprecated. Also worth noting—on some systems, the "Eject" verb isn’t always exposed for certain USB devices, especially if they mount differently. Overall, solid script. Just a few edge cases to keep in mind depending on how it's deployed.