I have an On Premises server in which I have 2 Office 365 powershells opened.
One for MSOnline powershell to automatedly assign license and enable MFA for new users
Another Exchange online powershell for certain exchange related automated tasks.
Problem is the server is set to restart once a month for patch updates and each time I have to launch these powershells manually to enter the credentials.
Is there any way to launch the powershells automatedly without me having to enter credentials manually.
Note: Azure Automation cannnot be considered.