Using Office 365 PowerShell with MFA enabled

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

ความคิดเห็น • 28

  • @ivanwill
    @ivanwill 5 ปีที่แล้ว +2

    Another brilliant detailed video. Thanks...!

  • @AliElhalaby
    @AliElhalaby 4 ปีที่แล้ว +1

    thank you very much , you save my day

  • @onebadg8
    @onebadg8 2 ปีที่แล้ว

    Problem I've had since enabling MFA is how do you automate this now that the O365 prompts come up to sign in.

    • @directorcia
      @directorcia  2 ปีที่แล้ว

      MFA is designed to prompt to provide additional security. If you don't want that look at using Azure Applications using what is known as the secure app model. I have videos on my channel about how to enable all that.

    • @onebadg8
      @onebadg8 2 ปีที่แล้ว

      @@directorcia ill look for those thanks! just trying to find a way to be able to still automate stuff while MFA stays active with the account being used.

    • @directorcia
      @directorcia  2 ปีที่แล้ว

      @@onebadg8 standard powershell with mfa requires login. The only approach that won’t now require an interactive login is the secure access model using the Microsoft Graph an Azure AD applications. I use it all the time to achieve exactly that.

  • @jimcopeland4011
    @jimcopeland4011 4 ปีที่แล้ว

    This is great for Exchange Online management, but what about Azure AD access? I work in an environment with no on-premise AD servers, so all our user management is either done via AzureAD or Exchange Online

    • @directorcia
      @directorcia  4 ปีที่แล้ว

      The Azure AD module already includes MFA abilities. Nothing extra is needed as it handles MFA and non MFA

  • @edriantomoro1658
    @edriantomoro1658 6 ปีที่แล้ว

    hi @Robert Crane
    i've tried to execute this from my side and i end up with the error below. what could be the issue?
    Import-Module : Cannot bind argument to parameter 'Name' because it is null.
    At line:1 char:15
    + ... port-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\\apps\2.0\") .

    • @directorcia
      @directorcia  6 ปีที่แล้ว

      R u running powershell as an administrator?

    • @edriantomoro1658
      @edriantomoro1658 6 ปีที่แล้ว

      @@directorcia I did try this script as Admin;
      Import-Module $((Get-ChildItem -Path $($env:localappdata +"\\apps\2.0\") -Filter microsoft.exchange.management.exopowershell.dll -Recurse).FullName | ?{$_ -notmatch '_none_' } | select -First 1 )
      and arrive in same error message

    • @directorcia
      @directorcia  6 ปีที่แล้ว

      @@edriantomoro1658 Don't know why you have this error, sorry. Test at my end and I have it working. Ensure you have command correct, PowerShell is version is current is really I can suggest further.

    • @Race0215
      @Race0215 6 ปีที่แล้ว +1

      I had the same error. It appears to be a typo in the module name we're trying to filter against. For my installation the module is called "Microsoft.Exchange.Management.ExoPowershellModule.dll". So the command should be:
      Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName|?{$_ -notmatch "_none_"}|select -First 1)
      Hopefully that helps.

  • @wcdunn
    @wcdunn 6 ปีที่แล้ว

    How are you getting that mobile device pop up on your pc screen?

    • @directorcia
      @directorcia  6 ปีที่แล้ว

      I use software from APowersoft

    • @directorcia
      @directorcia  6 ปีที่แล้ว

      Ah, those pop ups. They are via PushBullet.

  • @andrewquinn3863
    @andrewquinn3863 6 ปีที่แล้ว +1

    Great video

  • @MichaelScheidler
    @MichaelScheidler 5 ปีที่แล้ว

    I still get the same error when launching the application (while signed in with another user account)

    • @directorcia
      @directorcia  5 ปีที่แล้ว

      Ensure you run the MFA component on the machine as an administrator so it installs and you use Internet Explorer

  • @janithhiranthahettiarachchi
    @janithhiranthahettiarachchi 4 ปีที่แล้ว

    Thanks mate !

  • @msvalina007
    @msvalina007 ปีที่แล้ว

    Since Hybrid is removed, anyone know of an updated video?

    • @directorcia
      @directorcia  ปีที่แล้ว

      The latest modules support most scenarios including using modern MFA. This video 5 years old now and there are more modern approaches and updates that work just fine

  • @maharishisharma3395
    @maharishisharma3395 2 ปีที่แล้ว

    Really nice and informative video.
    Could you please share the import session script that you used in this video?
    I couldn't find it on the link that you have given.
    Thanks

    • @directorcia
      @directorcia  2 ปีที่แล้ว

      The process details in this video is now redundant as MS has updated all the modules to include MFA. For an updated apporach using my scripts see - th-cam.com/video/c1PwAbzM8RI/w-d-xo.html

  • @sujitkadam8386
    @sujitkadam8386 4 ปีที่แล้ว

    Can you schedule this Powershell script using Task scheduler? If yes, then whenever the script runs will it pop-up on mobile for authentication? I am researching and may find the answer but thought to ask here. Thanks this video is really helpful and step-by-step.

    • @directorcia
      @directorcia  4 ปีที่แล้ว

      See my other video for no login capabilities - th-cam.com/video/P3xhE2ESgE8/w-d-xo.html

  • @yangtuff
    @yangtuff 4 ปีที่แล้ว

    How can I automate a process to have newly created user accounts to be added to the MFA O365 group?

    • @directorcia
      @directorcia  4 ปีที่แล้ว

      Write a PowerShell script that does that. Those functions are all available via various PowerShell commands. I'm sure some internet searches will reveal someone who has already done just that.