nerdexam
MicrosoftMicrosoft

MS-102 · Question #44

MS-102 Question #44: Real Exam Question with Answer & Explanation

The correct answer is A: From Windows PowerShell on a domain controller, run the Get-ADUser and Set-ADUser cmdlets.. Because the domain is synced from on-premises Active Directory to Azure AD, the city attribute is authoritative in on-premises AD. To change it, you must modify the source - on-premises AD - not Azure AD directly (changes made in Azure AD for synced attributes will be overwritten

Submitted by deeparc· Apr 18, 2026Implement and manage Microsoft Entra identity and access

Question

Your network contains an Active Directory domain named adatum.com that is synced to Azure AD. The domain contains 100 user accounts. The city attribute for all the users is set to the city where the user resides. You need to modify the value of the city attribute to the three-letter airport code of each city. What should you do?

Options

  • AFrom Windows PowerShell on a domain controller, run the Get-ADUser and Set-ADUser cmdlets.
  • BFrom Azure Cloud Shell, run the Get-ADUser and Set-ADUser cmdlets.
  • CFrom Windows PowerShell on a domain controller, run the Get-MgUser and Update-MgUser
  • DFrom Azure Cloud Shell, run the Get-MgUser and Update-MgUser cmdlets.

Explanation

Because the domain is synced from on-premises Active Directory to Azure AD, the city attribute is authoritative in on-premises AD. To change it, you must modify the source - on-premises AD - not Azure AD directly (changes made in Azure AD for synced attributes will be overwritten on the next sync cycle). Get-ADUser and Set-ADUser are the correct PowerShell cmdlets for reading and modifying Active Directory user attributes. These cmdlets are part of the ActiveDirectory module and must be run from a domain controller or a machine with RSAT tools - not Azure Cloud Shell, which cannot reach on-premises AD. Get-MgUser/Update-MgUser (options C and D) are Microsoft Graph cmdlets for Azure AD, not on-premises AD.

Topics

#Active Directory Management#PowerShell Scripting#Hybrid Identity#User Attribute Management

Community Discussion

No community discussion yet for this question.

Full MS-102 PracticeBrowse All MS-102 Questions