cashealing.blogg.se

Office mfa
Office mfa




$adminCredentials = New-Object -TypeName -argumentlist $AdminUsername, $AdminPassword $AdminPassword = Read-Host -Prompt "Password" -AsSecureString $AdminUsername = Read-Host -Prompt "Azure/Office 365 Admin User Account" One way to achieve this is to ask the username and password from the script. This is handy when you need to connect to multple services with the same credentials. These cmdlets also have a parameter Credential and you can pass a PSCredential object. Each of these services has its own “login” cmdlet. Connecting to servicesīefore you can use cmdlets from modules like Azure PowerShell, Azure Active Directory and SharePoint Online you need to connect to these services first. In this post I want to point out how to deal with MFA enabled accounts in your PowerShell script. But that also might affect your PowerShell scripts. More and more customers are enabling MFA for administrator accounts to protect their cloud environment a little bit more. The use of multi-factor authentication (MFA) is growing by the day.






Office mfa