azureautomation/runbooks

Cannot use script on Server Core when MFA is enabled.

danielniccoli opened this issue · 0 comments

Cannot use script on Server Core when MFA is enabled.

PS C:\Users\admin> New-OnPremiseHybridWorker.ps1 @NewOnPremiseHybridWorkerParameters
Importing necessary modules...
     Successfully installed version 5.2.0 of Az...
Pulling Azure account credentials...
Connecting with the Following Parameters
WARNING: Unable to acquire token for tenant 'organizations'
WARNING: Please run 'Connect-AzAccount -DeviceCode' if browser is not supported in this session.
Connect-AzAccount : InteractiveBrowserCredential authentication failed: Unable to load DLL 'IEFRAME.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
At C:\Program Files\WindowsPowerShell\Scripts\New-OnPremiseHybridWorker.ps1:237 char:12
+ $Account = Connect-AzAccount @paramsplat
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

PS C:\Users\admin>