Using Powershell to detect the status if the laptop lid is open or shut
Hello all, I searched the WMI classes to try and figure out if there is a way to detect the status of a laptop lid and verify if it's open or shut. The reason is I'm testing a new script to update the bios and if a new version if found compared to what is installed on the machine.
It's working great but I had one user said when her laptop was plugged into a dock and her laptop lid was closed. She rebooted, which then it should have updated the laptops bios. Instead, it went to sleep.
She had to open the laptop lid for the BIOS update to complete. Her BIOS setting Power On Laptop when lid is open" was "disabled".
So, in the future, I like to find out if there is a Win32 class I can use to check the laptop lid status. Is it open or shut.
Any ideas or maybe some links you can share would be great.