I am somewhat new to powershell and am posting to hopefully get some guidance adding MFA to a script to allow me to access a webpage to check against text content in order to setup monitoring for the site (http content monitor). The site is using 2fa, where the second factor is the answer to a question. I took a look at the invoke-webrequest MS docs and searched quite a bit on adding MFA to the script but not able to find anything. There seems to be plenty of articles for Office 360, Exchange, SP, and Azure and leveraging their modules that support MFA.
If anyone has any insight or direction that they could provide me I would greatly appreciate it.