banit66881 Posted 7 hours ago Posted 7 hours ago Hi everyone, I’ve been using AutoIt for years to handle simple UI automation on my local desktop, but I’ve recently started trying to move some logic over to our Windows Server 2022 environment to help with some routine sysadmin tasks. My main goal right now is to automate the monitoring of our physical storage layer. A bit of background on why I'm doing this: I recently had a bit of a scare where a drive in our main array went into rebuild mode, and I didn’t notice for nearly two days because the vendor’s proprietary management software failed to send out the email alert. It made me realize I need a lightweight, custom solution that I can trust. I’m currently trying to write a script that interacts with the CLI of our RAID controller—specifically a PCIe HBA—to parse the output for any "Degraded" or "Failed" status strings. One specific point I'm struggling with is capturing the console output from these storage controller utilities without the command window flashing or hanging the script. I’ve tried using the StdoutRead function, but I’m finding that some of these low-level HBA utilities behave strangely when called through a script on a headless server, often returning empty strings or timing out. It’s definitely a bit more temperamental than automating a standard Windows GUI. I’m curious if anyone here has experience using AutoIt for this type of low-level hardware monitoring? I’ve been debating whether it’s better to pipe the CLI output to a temporary log file first and then have AutoIt parse the text, or if there is a more direct way to hook into WMI for storage controller health. Has anyone else run into issues with StdoutRead when dealing with 64-bit console utilities on a server environment, or is there a more stable approach for hardware-level reporting?
argumentum Posted 7 hours ago Posted 7 hours ago I coded a WMI ( look in my links ) toy to generate code. For the Run() without flashing, read the help file. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting
argumentum Posted 7 hours ago Posted 7 hours ago ...also, since these console utilities can redirect output to a file, use that too. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now