방법: Azure AD 이름 바꾸기

Azure AD(Azure Active Directory)는 제품의 다중 클라우드, 다중 플랫폼 기능을 더 잘 전달하고 Microsoft Entra 제품군의 이름을 통합하기 위해 Microsoft Entra ID로 이름이 변경되었습니다.

이 문서에서는 새로운 제품 이름과 아이콘으로 설명서나 콘텐츠를 업데이트하려는 고객과 조직을 위한 모범 사례와 지원을 제공합니다.

필수 조건

설명서나 콘텐츠에서 Azure AD 인스턴스를 Microsoft Entra ID로 변경하기 전에 Azure AD의 새 이름의 지침을 숙지하여 다음을 수행합니다.

  • 제품 이름과 변경 이유 파악

  • 신제품 아이콘 다운로드

  • 변경되지 않는 이름 목록 가져오기

  • FAQ(질문과 대답) 등에 대한 답변 얻기

콘텐츠에 대한 이름 바꾸기 업데이트 평가 및 범위 지정

환경을 감사하여 Azure AD 및 해당 아이콘에 대한 참조를 찾습니다.

  1. 콘텐츠를 검사하여 Azure AD 및 동의어에 대한 참조를 식별합니다. 모든 인스턴스의 세부 목록을 컴파일합니다.

    • 다음 용어를 검색합니다. Azure Active Directory (Azure AD), Azure Active Directory, Azure AD, AAD
    • Microsoft Entra ID 아이콘(Microsoft Entra ID 제품 아이콘)으로 바꿀 Azure AD 아이콘(Azure AD 제품 아이콘대체 Azure AD 제품 아이콘)이 있는 그래픽 검사

    Microsoft Entra 아키텍처 아이콘에서 Microsoft Entra ID 아이콘을 다운로드할 수 있습니다.

  2. 목록에서 예외를 식별합니다.

    • 호환성이 손상되는 변경을 하지 마세요.
    • 명명 지침의 변경되지 않는 이름은 무엇인가요? 섹션을 검토하고 변경되지 않는 Azure AD 용어를 확인합니다.
    • 의 인스턴스를 Active Directory변경하지 마세요. 다른 제품인 Windows Server Active Directory의 단축 이름인 Active Directory이(가) 아닌 Azure Active Directory만 이름이 바뀌고 있습니다.
  3. 향후 사용량을 기준으로 평가하고 우선 순위를 지정합니다. 사용자 대상 그룹인지, 조직, 대상 그룹 또는 고객 기반 내에서 폭넓은 표시 여부가 있는지 여부에 따라 어떤 콘텐츠를 업데이트해야 하는지 고려합니다. 최종 사용자에게 노출이 제한적인 경우 일부 코드나 콘텐츠를 업데이트할 필요가 없다고 결정할 수도 있습니다.

    동영상이나 블로그 등 기존의 날짜가 지난 콘텐츠를 향후 시청자를 위해 업데이트할 가치가 있는지 여부를 결정합니다. 오래된 콘텐츠의 이름을 바꾸지 않아도 됩니다. 최종 사용자를 돕기 위해 "Azure AD는 이제 Microsoft Entra ID입니다."와 같은 고지 사항을 추가할 수 있습니다.

텍스트 기반 콘텐츠에 "찾기 및 바꾸기" 사용

관련 도구를 사용하여 조직의 콘텐츠와 환경을 업데이트합니다.

  1. 거의 모든 편집 도구는 기본적으로 또는 플러그 인을 사용하여 "검색 및 바꾸기" 또는 "찾기 및 바꾸기" 기능을 제공합니다. 기본 설정 앱을 사용합니다.

  2. 문자열 Azure Active Directory (Azure AD), Azure Active Directory, Azure AD, AAD을(를) 찾으려면 "찾기 및 바꾸기"를 사용합니다.

  3. 모든 인스턴스를 Microsoft Entra ID로 바꾸지 마세요.

  4. 각 인스턴스가 제품을 참조하는지 아니면 제품의 기능을 참조하는지 검토합니다.

    • Azure AD는 제품 이름만 Microsoft Entra ID로 바꿔야 합니다.

    • Azure AD 기능은 Microsoft Entra 기능이 됩니다. 예를 들어, "Azure AD 조건부 액세스"는 "Microsoft Entra 조건부 액세스"가 됩니다.

사용자 지정 코드를 사용하여 대량 편집 자동화

다음 기준을 사용하여 Azure Active Directory (Azure AD), Azure Active Directory, Azure AD, AAD의 인스턴스에 적용해야 하는 변경 내용을 결정합니다.

  1. 이전 용어의 명명 사전에서 텍스트 문자열이 발견되면 이를 새 용어로 변경합니다.

  2. 문장 부호가 Azure Active Directory (Azure AD), Azure Active Directory, Azure AD 또는 AAD 뒤에 오면 제품 이름이므로 Microsoft Entra ID(으)로 바꿉니다.

  3. Azure Active Directory (Azure AD), Azure Active Directory, Azure AD 또는 AAD 뒤에 for, Premium, Plan, P1 또는 P2이(가) 오면 SKU 이름 또는 서비스 플랜을 나타내므로 Microsoft Entra ID(으)로 바꿉니다.

  4. 관사(a, an, the) 또는 소유격(your, your organization's)이 (Azure Active Directory (Azure AD), Azure Active Directory, Azure AD, AAD) 앞에 오면 기능 이름이므로 Microsoft Entra(으)로 바꿉니다. 예시:

    1. "Azure AD 테넌트"는 "Microsoft Entra 테넌트"가 됩니다.
    2. "조직의 Azure AD 테넌트"는 "Microsoft Entra 테넌트"가 됩니다.
  5. Azure Active Directory (Azure AD), Azure Active Directory, Azure AD 또는 AAD 뒤에 이전 단계에 없는 형용사 또는 명사가 오면 기능 이름이므로 Microsoft Entra(으)로 바꿉니다. 예를 들어, Azure AD Conditional AccessMicrosoft Entra Conditional Access이(가) 되고 Azure AD tenantMicrosoft Entra tenant이(가) 됩니다.

  6. 그렇지 않으면 Azure Active Directory (Azure AD), Azure Active Directory, Azure AD 또는 AAD을(를) Microsoft Entra ID(으)로 바꿉니다.

    사용자 지정 논리를 더욱 구체화하려면 업데이트된 용어집 섹션을 참조하세요.

그래픽 및 아이콘 업데이트

다음 단계에 따라 그래픽 및 아이콘을 업데이트합니다.

  1. Azure AD 아이콘을 Microsoft Entra ID 아이콘으로 바꿉니다.

  2. Azure Active Directory (Azure AD), Azure Active Directory, Azure AD 또는 AAD을(를) 포함하는 제목이나 텍스트를 Microsoft Entra ID(으)로 바꿉니다.

고객에게 변경 내용 전달

고객이 전환할 수 있도록 업데이트된 콘텐츠 또는 설명서에 메모를 추가하는 것이 좋습니다.

  1. 첫 해에 새 이름을 formerly Azure Active Directory 추가 Azure Active Directory is now Microsoft Entra ID 하거나 따릅니다.

샘플 PowerShell 스크립트

다음 PowerShell 스크립트를 기준으로 사용하여 설명서나 콘텐츠에서 Azure AD 참조의 이름을 바꿀 수 있습니다. 이 코드 샘플은 다음과 같습니다.

  • 지정된 폴더 및 모든 중첩 폴더 내의 .resx 파일을 검사합니다.
  • Azure Active Directory (Azure AD), Azure Active Directory, Azure AD, AAD에 대한 참조를 Azure AD의 새 이름에 따라 올바른 용어로 바꿔 파일을 편집합니다.

필요와 업데이트해야 하는 파일 범위에 따라 기준 스크립트를 편집합니다. 원본 파일에서 메시지를 정의한 방법에 따라 극단적인 경우를 고려하고 스크립트를 수정해야 할 수도 있습니다. 스크립트가 완전히 자동화되지 않았습니다. 스크립트를 있는 그대로 사용하는 경우 출력을 검토해야 하며 Azure AD의 새 이름의 지침을 따르도록 추가 조정이 필요할 수 있습니다.

# Define the old and new terminology
$terminology = @(
    @{ Key = 'Azure AD External Identities'; Value = 'Microsoft Entra External ID' },
    @{ Key = 'Azure AD Identity Governance'; Value = 'Microsoft Entra ID Governance' },
    @{ Key = 'Azure AD Verifiable Credentials'; Value = 'Microsoft Entra Verified ID' },
    @{ Key = 'Azure AD Workload Identities'; Value = 'Microsoft Entra Workload ID' },
    @{ Key = 'Azure AD Domain Services'; Value = 'Microsoft Entra Domain Services' },
    @{ Key = 'Azure AD access token authentication'; Value = 'Microsoft Entra access token authentication' },
    @{ Key = 'Azure AD admin center'; Value = 'Microsoft Entra admin center' },
    @{ Key = 'Azure AD portal'; Value = 'Microsoft Entra admin center' },
    @{ Key = 'Azure AD application proxy'; Value = 'Microsoft Entra application proxy' },
    @{ Key = 'Azure AD authentication'; Value = 'Microsoft Entra authentication' },
    @{ Key = 'Azure AD Conditional Access'; Value = 'Microsoft Entra Conditional Access' },
    @{ Key = 'Azure AD cloud-only identities'; Value = 'Microsoft Entra cloud-only identities' },
    @{ Key = 'Azure AD Connect'; Value = 'Microsoft Entra Connect' },
    @{ Key = 'AD Connect'; Value = 'Microsoft Entra Connect' },
    @{ Key = 'AD Connect Sync'; Value = 'Microsoft Entra Connect Sync' },
    @{ Key = 'Azure AD Connect Sync'; Value = 'Microsoft Entra Connect Sync' },
    @{ Key = 'Azure AD domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'Azure AD domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'Azure AD Domain Services'; Value = 'Microsoft Entra Domain Services' },
    @{ Key = 'Azure AD Enterprise Applications'; Value = 'Microsoft Entra enterprise applications' },
    @{ Key = 'Azure AD federation services'; Value = 'Active Directory Federation Services' },
    @{ Key = 'Azure AD hybrid identities'; Value = 'Microsoft Entra hybrid identities' },
    @{ Key = 'Azure AD identities'; Value = 'Microsoft Entra identities' },
    @{ Key = 'Azure AD role'; Value = 'Microsoft Entra role' },
    @{ Key = 'Azure AD'; Value = 'Microsoft Entra ID' },
    @{ Key = 'AAD'; Value = 'ME-ID' },
    @{ Key = 'Azure AD auth'; Value = 'Microsoft Entra auth' },
    @{ Key = 'Azure AD-only auth'; Value = 'Microsoft Entra-only auth' },
    @{ Key = 'Azure AD object'; Value = 'Microsoft Entra object' },
    @{ Key = 'Azure AD identity'; Value = 'Microsoft Entra identity' },
    @{ Key = 'Azure AD schema'; Value = 'Microsoft Entra schema' },
    @{ Key = 'Azure AD seamless single sign-on'; Value = 'Microsoft Entra seamless single sign-on' },
    @{ Key = 'Azure AD self-service password reset'; Value = 'Microsoft Entra self-service password reset' },
    @{ Key = 'Azure AD SSPR'; Value = 'Microsoft Entra SSPR' },
    @{ Key = 'Azure AD domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'Azure AD group'; Value = 'Microsoft Entra group' },
    @{ Key = 'Azure AD login'; Value = 'Microsoft Entra login' },
    @{ Key = 'Azure AD managed'; Value = 'Microsoft Entra managed' },
    @{ Key = 'Azure AD entitlement'; Value = 'Microsoft Entra entitlement' },
    @{ Key = 'Azure AD access review'; Value = 'Microsoft Entra access review' },
    @{ Key = 'Azure AD Identity Protection'; Value = 'Microsoft Entra ID Protection' },
    @{ Key = 'Azure AD pass-through'; Value = 'Microsoft Entra pass-through' },
    @{ Key = 'Azure AD password'; Value = 'Microsoft Entra password' },
    @{ Key = 'Azure AD Privileged Identity Management'; Value = 'Microsoft Entra Privileged Identity Management' },
    @{ Key = 'Azure AD registered'; Value = 'Microsoft Entra registered' },
    @{ Key = 'Azure AD reporting and monitoring'; Value = 'Microsoft Entra reporting and monitoring' },
    @{ Key = 'Azure AD enterprise app'; Value = 'Microsoft Entra enterprise app' },
    @{ Key = 'Azure AD cloud-only identities'; Value = 'Microsoft Entra cloud-only identities' },
    @{ Key = 'Cloud Knox'; Value = 'Microsoft Entra Permissions Management' },
    @{ Key = 'Azure AD Premium P1'; Value = 'Microsoft Entra ID P1' },
    @{ Key = 'AD Premium P1'; Value = 'Microsoft Entra ID P1' },
    @{ Key = 'Azure AD Premium P2'; Value = 'Microsoft Entra ID P2' },
    @{ Key = 'AD Premium P2'; Value = 'Microsoft Entra ID P2' },
    @{ Key = 'Azure AD F2'; Value = 'Microsoft Entra ID F2' },
    @{ Key = 'Azure AD Free'; Value = 'Microsoft Entra ID Free' },
    @{ Key = 'Azure AD for education'; Value = 'Microsoft Entra ID for education' },
    @{ Key = 'Azure AD work or school account'; Value = 'Microsoft Entra work or school account' },
    @{ Key = 'federated with Azure AD'; Value = 'federated with Microsoft Entra' },
    @{ Key = 'Hybrid Azure AD Join'; Value = 'Microsoft Entra hybrid join' },
    @{ Key = 'Azure Active Directory External Identities'; Value = 'Microsoft Entra External ID' },
    @{ Key = 'Azure Active Directory Identity Governance'; Value = 'Microsoft Entra ID Governance' },
    @{ Key = 'Azure Active Directory Verifiable Credentials'; Value = 'Microsoft Entra Verified ID' },
    @{ Key = 'Azure Active Directory Workload Identities'; Value = 'Microsoft Entra Workload ID' },
    @{ Key = 'Azure Active Directory Domain Services'; Value = 'Microsoft Entra Domain Services' },
    @{ Key = 'Azure Active Directory access token authentication'; Value = 'Microsoft Entra access token authentication' },
    @{ Key = 'Azure Active Directory admin center'; Value = 'Microsoft Entra admin center' },
    @{ Key = 'Azure Active Directory portal'; Value = 'Microsoft Entra admin center' },
    @{ Key = 'Azure Active Directory application proxy'; Value = 'Microsoft Entra application proxy' },
    @{ Key = 'Azure Active Directory authentication'; Value = 'Microsoft Entra authentication' },
    @{ Key = 'Azure Active Directory Conditional Access'; Value = 'Microsoft Entra Conditional Access' },
    @{ Key = 'Azure Active Directory cloud-only identities'; Value = 'Microsoft Entra cloud-only identities' },
    @{ Key = 'Azure Active Directory Connect'; Value = 'Microsoft Entra Connect' },
    @{ Key = 'Azure Active Directory Connect Sync'; Value = 'Microsoft Entra Connect Sync' },
    @{ Key = 'Azure Active Directory domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'Azure Active Directory domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'Azure Active Directory Domain Services'; Value = 'Microsoft Entra Domain Services' },
    @{ Key = 'Azure Active Directory Enterprise Applications'; Value = 'Microsoft Entra enterprise applications' },
    @{ Key = 'Azure Active Directory federation services'; Value = 'Active Directory Federation Services' },
    @{ Key = 'Azure Active Directory hybrid identities'; Value = 'Microsoft Entra hybrid identities' },
    @{ Key = 'Azure Active Directory identities'; Value = 'Microsoft Entra identities' },
    @{ Key = 'Azure Active Directory role'; Value = 'Microsoft Entra role' },
    @{ Key = 'Azure Active Directory'; Value = 'Microsoft Entra ID' },
    @{ Key = 'Azure Active Directory auth'; Value = 'Microsoft Entra auth' },
    @{ Key = 'Azure Active Directory-only auth'; Value = 'Microsoft Entra-only auth' },
    @{ Key = 'Azure Active Directory object'; Value = 'Microsoft Entra object' },
    @{ Key = 'Azure Active Directory identity'; Value = 'Microsoft Entra identity' },
    @{ Key = 'Azure Active Directory schema'; Value = 'Microsoft Entra schema' },
    @{ Key = 'Azure Active Directory seamless single sign-on'; Value = 'Microsoft Entra seamless single sign-on' },
    @{ Key = 'Azure Active Directory self-service password reset'; Value = 'Microsoft Entra self-service password reset' },
    @{ Key = 'Azure Active Directory SSPR'; Value = 'Microsoft Entra SSPR' },
    @{ Key = 'Azure Active Directory SSPR'; Value = 'Microsoft Entra SSPR' },
    @{ Key = 'Azure Active Directory domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'Azure Active Directory group'; Value = 'Microsoft Entra group' },
    @{ Key = 'Azure Active Directory login'; Value = 'Microsoft Entra login' },
    @{ Key = 'Azure Active Directory managed'; Value = 'Microsoft Entra managed' },
    @{ Key = 'Azure Active Directory entitlement'; Value = 'Microsoft Entra entitlement' },
    @{ Key = 'Azure Active Directory access review'; Value = 'Microsoft Entra access review' },
    @{ Key = 'Azure Active Directory Identity Protection'; Value = 'Microsoft Entra ID Protection' },
    @{ Key = 'Azure Active Directory pass-through'; Value = 'Microsoft Entra pass-through' },
    @{ Key = 'Azure Active Directory password'; Value = 'Microsoft Entra password' },
    @{ Key = 'Azure Active Directory Privileged Identity Management'; Value = 'Microsoft Entra Privileged Identity Management' },
    @{ Key = 'Azure Active Directory registered'; Value = 'Microsoft Entra registered' },
    @{ Key = 'Azure Active Directory reporting and monitoring'; Value = 'Microsoft Entra reporting and monitoring' },
    @{ Key = 'Azure Active Directory enterprise app'; Value = 'Microsoft Entra enterprise app' },
    @{ Key = 'Azure Active Directory cloud-only identities'; Value = 'Microsoft Entra cloud-only identities' },
    @{ Key = 'Azure Active Directory Premium P1'; Value = 'Microsoft Entra ID P1' },
    @{ Key = 'Azure Active Directory Premium P2'; Value = 'Microsoft Entra ID P2' },
    @{ Key = 'Azure Active Directory F2'; Value = 'Microsoft Entra ID F2' },
    @{ Key = 'Azure Active Directory Free'; Value = 'Microsoft Entra ID Free' },
    @{ Key = 'Azure Active Directory for education'; Value = 'Microsoft Entra ID for education' },
    @{ Key = 'Azure Active Directory work or school account'; Value = 'Microsoft Entra work or school account' },
    @{ Key = 'federated with Azure Active Directory'; Value = 'federated with Microsoft Entra' },
    @{ Key = 'Hybrid Azure Active Directory Join'; Value = 'Microsoft Entra hybrid join' },
    @{ Key = 'AAD External Identities'; Value = 'Microsoft Entra External ID' },
    @{ Key = 'AAD Identity Governance'; Value = 'Microsoft Entra ID Governance' },
    @{ Key = 'AAD Verifiable Credentials'; Value = 'Microsoft Entra Verified ID' },
    @{ Key = 'AAD Workload Identities'; Value = 'Microsoft Entra Workload ID' },
    @{ Key = 'AAD Domain Services'; Value = 'Microsoft Entra Domain Services' },
    @{ Key = 'AAD access token authentication'; Value = 'Microsoft Entra access token authentication' },
    @{ Key = 'AAD admin center'; Value = 'Microsoft Entra admin center' },
    @{ Key = 'AAD portal'; Value = 'Microsoft Entra admin center' },
    @{ Key = 'AAD application proxy'; Value = 'Microsoft Entra application proxy' },
    @{ Key = 'AAD authentication'; Value = 'Microsoft Entra authentication' },
    @{ Key = 'AAD Conditional Access'; Value = 'Microsoft Entra Conditional Access' },
    @{ Key = 'AAD cloud-only identities'; Value = 'Microsoft Entra cloud-only identities' },
    @{ Key = 'AAD Connect'; Value = 'Microsoft Entra Connect' },
    @{ Key = 'AAD Connect Sync'; Value = 'Microsoft Entra Connect Sync' },
    @{ Key = 'AAD domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'AAD domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'AAD Domain Services'; Value = 'Microsoft Entra Domain Services' },
    @{ Key = 'AAD Enterprise Applications'; Value = 'Microsoft Entra enterprise applications' },
    @{ Key = 'AAD federation services'; Value = 'Active Directory Federation Services' },
    @{ Key = 'AAD hybrid identities'; Value = 'Microsoft Entra hybrid identities' },
    @{ Key = 'AAD identities'; Value = 'Microsoft Entra identities' },
    @{ Key = 'AAD role'; Value = 'Microsoft Entra role' },
    @{ Key = 'AAD'; Value = 'Microsoft Entra ID' },
    @{ Key = 'AAD auth'; Value = 'Microsoft Entra auth' },
    @{ Key = 'AAD-only auth'; Value = 'Microsoft Entra-only auth' },
    @{ Key = 'AAD object'; Value = 'Microsoft Entra object' },
    @{ Key = 'AAD identity'; Value = 'Microsoft Entra identity' },
    @{ Key = 'AAD schema'; Value = 'Microsoft Entra schema' },
    @{ Key = 'AAD seamless single sign-on'; Value = 'Microsoft Entra seamless single sign-on' },
    @{ Key = 'AAD self-service password reset'; Value = 'Microsoft Entra self-service password reset' },
    @{ Key = 'AAD SSPR'; Value = 'Microsoft Entra SSPR' },
    @{ Key = 'AAD SSPR'; Value = 'Microsoft Entra SSPR' },
    @{ Key = 'AAD domain'; Value = 'Microsoft Entra domain' },
    @{ Key = 'AAD group'; Value = 'Microsoft Entra group' },
    @{ Key = 'AAD login'; Value = 'Microsoft Entra login' },
    @{ Key = 'AAD managed'; Value = 'Microsoft Entra managed' },
    @{ Key = 'AAD entitlement'; Value = 'Microsoft Entra entitlement' },
    @{ Key = 'AAD access review'; Value = 'Microsoft Entra access review' },
    @{ Key = 'AAD Identity Protection'; Value = 'Microsoft Entra ID Protection' },
    @{ Key = 'AAD pass-through'; Value = 'Microsoft Entra pass-through' },
    @{ Key = 'AAD password'; Value = 'Microsoft Entra password' },
    @{ Key = 'AAD Privileged Identity Management'; Value = 'Microsoft Entra Privileged Identity Management' },
    @{ Key = 'AAD registered'; Value = 'Microsoft Entra registered' },
    @{ Key = 'AAD reporting and monitoring'; Value = 'Microsoft Entra reporting and monitoring' },
    @{ Key = 'AAD enterprise app'; Value = 'Microsoft Entra enterprise app' },
    @{ Key = 'AAD cloud-only identities'; Value = 'Microsoft Entra cloud-only identities' },
    @{ Key = 'AAD Premium P1'; Value = 'Microsoft Entra ID P1' },
    @{ Key = 'AAD Premium P2'; Value = 'Microsoft Entra ID P2' },
    @{ Key = 'AAD F2'; Value = 'Microsoft Entra ID F2' },
    @{ Key = 'AAD Free'; Value = 'Microsoft Entra ID Free' },
    @{ Key = 'AAD for education'; Value = 'Microsoft Entra ID for education' },
    @{ Key = 'AAD work or school account'; Value = 'Microsoft Entra work or school account' },
    @{ Key = 'federated with AAD'; Value = 'federated with Microsoft Entra' },
    @{ Key = 'Hybrid AAD Join'; Value = 'Microsoft Entra hybrid join' }
)

$postTransforms = @(
    @{ Key = 'Microsoft Entra ID B2C'; Value = 'Azure AD B2C' },
    @{ Key = 'Microsoft Entra ID B2B'; Value = 'Microsoft Entra B2B' },
    @{ Key = 'ME-ID B2C'; Value = 'AAD B2C' },
    @{ Key = 'ME-ID B2B'; Value = 'Microsoft Entra B2B' },
    @{ Key = 'ME-IDSTS'; Value = 'AADSTS' },
    @{ Key = 'ME-ID Connect'; Value = 'Microsoft Entra Connect' }
    @{ Key = 'Microsoft Entra ID tenant'; Value = 'Microsoft Entra tenant' }
    @{ Key = 'Microsoft Entra ID organization'; Value = 'Microsoft Entra tenant' }
    @{ Key = 'Microsoft Entra ID account'; Value = 'Microsoft Entra account' }
    @{ Key = 'Microsoft Entra ID resources'; Value = 'Microsoft Entra resources' }
    @{ Key = 'Microsoft Entra ID admin'; Value = 'Microsoft Entra admin' }
    @{ Key = ' an Microsoft Entra'; Value = ' a Microsoft Entra' }
    @{ Key = '>An Microsoft Entra'; Value = '>A Microsoft Entra' }
    @{ Key = ' an ME-ID'; Value = ' a ME-ID' }
    @{ Key = '>An ME-ID'; Value = '>A ME-ID' }
    @{ Key = 'Microsoft Entra ID administration portal'; Value = 'Microsoft Entra administration portal' }
    @{ Key = 'Microsoft Entra ID Advanced Threat'; Value = 'Azure Advanced Threat' }
    @{ Key = 'Entra ID hybrid join'; Value = 'Entra hybrid join' }
    @{ Key = 'Microsoft Entra ID join'; Value = 'Microsoft Entra join' }
    @{ Key = 'ME-ID join'; Value = 'Microsoft Entra join' }
    @{ Key = 'Microsoft Entra ID service principal'; Value = 'Microsoft Entra service principal' }
    @{ Key = 'Download Microsoft Entra Connector'; Value = 'Download connector' }
    @{ Key = 'Microsoft Microsoft'; Value = 'Microsoft' }
)

# Sort the replacements by the length of the keys in descending order
$terminology = $terminology.GetEnumerator() | Sort-Object -Property { $_.Key.Length } -Descending
$postTransforms = $postTransforms.GetEnumerator() | Sort-Object -Property { $_.Key.Length } -Descending

# Get all resx files in the current directory and its subdirectories, ignoring .gitignored files.
Write-Host "Getting all resx files in the current directory and its subdirectories, ignoring .gitignored files."
$gitIgnoreFiles = Get-ChildItem -Path . -Filter .gitignore -Recurse
$targetFiles = Get-ChildItem -Path . -Include *.resx -Recurse

$filteredFiles = @()
foreach ($file in $targetFiles) {
    $ignoreFile = $gitIgnoreFiles | Where-Object { $_.DirectoryName -eq $file.DirectoryName }
    if ($ignoreFile) {
        $excludedPatterns = Get-Content $ignoreFile.FullName | Select-String -Pattern '^(?!#).*' | ForEach-Object { $_.Line }
        if ($excludedPatterns -notcontains $file.Name) {
            $filteredFiles += $file
        }
    }
    else {
        $filteredFiles += $file
    }
}

$scriptPath = $MyInvocation.MyCommand.Path
$filteredFiles = $filteredFiles | Where-Object { $_.FullName -ne $scriptPath }

# This command will get all the files with the extensions .resx in the current directory and its subdirectories, and then filter out those that match the patterns in the .gitignore file. The Resolve-Path cmdlet will find the full path of the .gitignore file, and the Get-Content cmdlet will read its content as a single string. The -notmatch operator will compare the full name of each file with the .gitignore content using regular expressions, and return only those that do not match.
Write-Host "Found $($filteredFiles.Count) files."

function Update-Terminology {
    param (
        [Parameter(Mandatory = $true)]
        [ref]$Content,
        [Parameter(Mandatory = $true)]
        [object[]]$Terminology
    )

    foreach ($item in $Terminology.GetEnumerator()) {
        $old = [regex]::Escape($item.Key)
        $new = $item.Value
        $toReplace = '(?<!(name=\"[^$]{1,100}|https?://aka.ms/[a-z0-9/-]{1,100}))' + $($old)

        # Replace the old terminology with the new one
        $Content.Value = $Content.Value -replace $toReplace, $new
    }
}

# Loop through each file
foreach ($file in $filteredFiles) {
    # Read the content of the file
    $content = Get-Content $file.FullName

    Write-Host "Processing $file"

    Update-Terminology -Content ([ref]$content) -Terminology $terminology
    Update-Terminology -Content ([ref]$content) -Terminology $postTransforms

    $newContent = $content -join "`n"
    if ($newContent -ne (Get-Content $file.FullName -Raw)) {
        Write-Host "Updating $file"
        # Write the updated content back to the file
        Set-Content -Path $file.FullName -Value $newContent
    }
}