
For now, I just have the Default profile folder get deleted but this is using a partially hard-coded path and I'm afraid that will eventually change on me. However, I cannot figure out how to clear browsing data from the user data folder. Recently, I figured out how to use the WinForms version of the Microsoft Edge WebView2 control in PowerShell to replace the old WebBrowser control since IE is being deprecated both by MS as well as the service I'm authenticating in the browser against with an API module I've written. I don't know if I have to call a specific method syncronously or using an async job and I can't figure out exactly what to call. I am am hoping someone who is familiar with reading Microsoft's APIs documentation can help me figure this one out. In addition, this version of the SDK requires EdgeWebView2 version 1.22 to be installed for full API compatibility. So that's why I couldn't figure it out! I've since updated my code to do this with the new control version.

Update for anyone coming across this: The ability to use the WebView2 SDK to clear the browsing data wasn't released until version.
