Migrate Azure AD Cloud Users to Active Directory with PowerShell and Azure AD Connect

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

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

  • @haq.sempoi
    @haq.sempoi หลายเดือนก่อน +1

    I have finally done it after a lot of googling.. Thank you very much, sir! This is better than Microsoft support..

    • @ShotokuTech
      @ShotokuTech  หลายเดือนก่อน

      Glad to hear that. Best wishes.

  • @SuperFranva
    @SuperFranva 10 วันที่ผ่านมา +1

    After running the script, the user is created in on-premises AD, but when I run the delta sync, I see the following error: AttributeValueMustBeUnique 😢😢

  • @BDBD16
    @BDBD16 ปีที่แล้ว +3

    The whole Az Sync model is just a bandage to get us all directly into M365.

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

      Sure it is. But it was an interesting question just the same. How to get back out. Thanks!

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

    Thanks, Great for setting up demo users.

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

      Thanks for watching!

  • @Bemipefe
    @Bemipefe 3 หลายเดือนก่อน +1

    I still can't figure out how can I sync attributes like location, street etc ... these wasn't added with the initial New-ADUser command and now they are still black although the sync is enabled and the "On-premises sync enabled" attribute on Azure is "Yes".

    • @ShotokuTech
      @ShotokuTech  3 หลายเดือนก่อน +1

      I think I will revisit this and see if there is a new, better supported method. Soon!

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

    Im trying to do the same, this time for group. Hope you can share how or at least give the documentations coz im getting confused where to look for it.
    Basically what im trying to do is: Migrate Users and Group from Azure AD (EntraID) to On-prem AD (Newly built)

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

      Hello. Read this article: learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-connect-migrate-groups
      It's not a matter of using Entra ID Connect to sync groups as much as it is using PowerShell to get group name and immutable ID, then create in AD. I will try to look at this further. But my current schedule would have that weeks away from now. Thanks.

    • @DevyProject
      @DevyProject 10 หลายเดือนก่อน +1

      Update on this?

  • @mainegrower
    @mainegrower 4 หลายเดือนก่อน +1

    I had a helpdesk person accidentally delete out some users. I used the script to move the azure user to AD and then set a password and ended up having to run ForensIT user profile wizard app to make the profile not end up blank on login. My issue is now I have some users with Object GUID, On premises AD not matching that on Microsoft Entra ID showing them as a duplicate so now the groups are not associating with them when emails are sent on office 365. I'm just wondering if I can edit my on premisis AD value to match the entra ID and if so will it break the local user login. on their machines again and make me have to fix the user profile again with the app I had used?

    • @ShotokuTech
      @ShotokuTech  4 หลายเดือนก่อน

      I probably would have taken the option to restore the objects from the recycle bin. I did a video on how to set the ms-ds-consistencyguid to match users between AD and Entra ID. "Azure AD Connect: Soft Match Users in Azure AD When Migrating Between AD Forests". th-cam.com/video/uNic15UhjM8/w-d-xo.html
      There might be something useful for you in that. I can't speak to the profile on the users workstation. Best wishes.

    • @mainegrower
      @mainegrower 4 หลายเดือนก่อน

      @@ShotokuTech the recycling bin was not enabled on Active directory Administrative Center. I turned it on after the incident and is working right and shows deleted things now. Just wasn't something that was turned on at that moment. I will take a look at the video. Thank you so much for the reply.

    • @ShotokuTech
      @ShotokuTech  4 หลายเดือนก่อน

      @@mainegrower Best wishes.

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

    Interesting as id have thought the immutable ID wouldnt have matched/been created to anchor both accounts together.

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

      Haha I commented this just before you started talking about it later in the video!!

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

      This was an interesting question to answer. Thanks for watching.

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

      You'll get a kick out of this one: Azure AD Connect: Soft Match Users in Azure AD When Migrating Between AD Forests.
      th-cam.com/video/uNic15UhjM8/w-d-xo.html

  • @noahjonny7737
    @noahjonny7737 5 หลายเดือนก่อน +1

    Great video, thank you! So basically the password not written to AD and therefore you need to reset it in the AD which then syncs and causes users not to know their password, is that correct? Isn't there a way to sync the AAD password back to AD? And is there a way I can select an OU where to put these AAD users? Or can I manually move them to my desired location without breaking things? Your help is much appreciated and thanks again!

    • @ShotokuTech
      @ShotokuTech  5 หลายเดือนก่อน +1

      First, you should already be using Self Service Password Recovery. Second, I would enable password hash sync beforehand. If you look at 3:20 in the video the New-ADUser command has the -path parameter which will certainly let you choose the target OU for the new user object.

  • @jerryactrik1901
    @jerryactrik1901 8 หลายเดือนก่อน +1

    Would there be a way to write the same script, but have it point to all the members of a group?

    • @ShotokuTech
      @ShotokuTech  8 หลายเดือนก่อน

      You can write a different script that would enumerate all the groups and recreate them in AD, then enumerate group memberships and add those UPNs to the groups in AD. It would be a different script.

  • @RRSustainibility
    @RRSustainibility 6 หลายเดือนก่อน +1

    I'm still unable to connect it, the PS is not showing anything.

    • @ShotokuTech
      @ShotokuTech  6 หลายเดือนก่อน

      So you are having an issue connecting to Entra ID using powershell with the azuread module installed? What do you think the problem is?

  • @abdelfattahseleim5537
    @abdelfattahseleim5537 10 หลายเดือนก่อน +1

    Thanks, Great for setting up demo users , pls can you help me to solve this issue , i need to combine two value from AAD to one in AD - Ds " FirstName+LastName" to Display Name

    • @ShotokuTech
      @ShotokuTech  10 หลายเดือนก่อน

      I think you could make a new sync rule from the cloud to AD. I am just not certain of the syntax. I might take a look.

  • @balagangadharTilakmadu
    @balagangadharTilakmadu 7 หลายเดือนก่อน +1

    Do we need Global Admin account to do this? or can we perform with an admin account?

    • @ShotokuTech
      @ShotokuTech  7 หลายเดือนก่อน +1

      My team has enough rights to install and monitor Entra Connect (Azure AD Connect) as members of Hybrid Identity Administrator role. We turned off visibility of Entra ID directory to all users which is a default and only allow the Directory Readers role to read the directory. So I assigned my team those two roles.

  • @RonaldValade
    @RonaldValade 2 หลายเดือนก่อน

    Have you ever determined why -Country was breaking everything?

    • @RonaldValade
      @RonaldValade 2 หลายเดือนก่อน +1

      Believe I answered my own question! Azure AD stores the -Country variable as the long text form of a country name ("United States") and local Active Directory expects a two-letter country code. (US)

    • @ShotokuTech
      @ShotokuTech  2 หลายเดือนก่อน

      Thanks, yes country is an interesting question between Entra and AD. So you solved my problem. Country in Azure is Country Code in AD. So how to digest that into a script? Need to hash it down from full text in azure to acceptable two-letter codes. Best wishes!

  • @SyntetikVision
    @SyntetikVision 4 หลายเดือนก่อน +1

    It's possible to sync user from AAD to AD without modify the password ? Imagine you have 2k users, it's a pain to ask all of them to change their password. thank you for the video

    • @ShotokuTech
      @ShotokuTech  4 หลายเดือนก่อน

      You might try configuring password writeback before running the script. Leave the accounts disabled until sync is run and the user is matched. That might work. The underlying problem is you are using the script to create a copy of the Entra ID user object, then matching with with Entra Connect after the fact. I'm not certain password hash sync would cooperate with the migration and send the password back from the cloud to AD.
      You can also break up the scope of the migration into smaller groups of users rather than doing them all at once.

    • @ShotokuTech
      @ShotokuTech  4 หลายเดือนก่อน

      I am seeing this for the first time in Entra Connect setup: "User Writeback". I wonder how that works!?