Automated Windows Updates

I am trying to get automated windows updates done. I found this script online and have made a few tweaks to it. The problem I am having is it will not automatically install certain updates (I have noticed specifically driver updates for sure). I know it classifies them by update type. I do see a portion that gives you the message if flagged for needing user interaction. What I don’t understand is why those would need user interaction where other update files don’t. Just trying to be able to use this to patch computers once I have imaged them up to the current patches. Any help is very greatly appreciated.

https://gist.github.com/Brothajiff/739db3c7a7b0338d7c95e0358fcf37cf  

Unfortunately how MS flags updates is beyond anyone’s control or knowledge but theirs.

So is it not possible to automate the updates with powershell? Also if you could suggest another avenue if it is not possible?