It could be a situation when you want to extract the clear text password from the wireless Connections without elevation or GUI.
I wrote this script a while ago and it’s kind of usable sometimes.
The script is located here:
https://github.com/stefanschorling/SEC-LABS/blob/master/Get-WPAKeys.ps1