diff --git a/.github/actions/spelling/expect/generic_terms.txt b/.github/actions/spelling/expect/generic_terms.txt index 870c3e87..29768290 100644 --- a/.github/actions/spelling/expect/generic_terms.txt +++ b/.github/actions/spelling/expect/generic_terms.txt @@ -20,3 +20,4 @@ usr versioning VGpu ADDLOCAL +Cim diff --git a/pipelines/azure-pipelines.yml b/pipelines/azure-pipelines.yml index e68067ed..88448380 100644 --- a/pipelines/azure-pipelines.yml +++ b/pipelines/azure-pipelines.yml @@ -1,5 +1,5 @@ # winget-dsc pipeline to publish artifacts -name: '$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)' +name: "$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)" # Commit triggers trigger: @@ -41,43 +41,47 @@ extends: - stage: WinGet_DSC_Artifacts_Publish jobs: - job: Publish_WinGet_DSC_Resources - displayName: 'Publish WinGet DSC Resources' + displayName: "Publish WinGet DSC Resources" templateContext: outputs: - output: pipelineArtifact - displayName: 'Publish Pipeline Microsoft.Windows.Developer' + displayName: "Publish Pipeline Microsoft.Windows.Developer" targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Developer\ artifactName: Microsoft.Windows.Developer - output: pipelineArtifact - displayName: 'Publish Pipeline Microsoft.Windows.Setting.Accessibility' + displayName: "Publish Pipeline Microsoft.Windows.Setting.Accessibility" targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Setting.Accessibility\ artifactName: Microsoft.Windows.Setting.Accessibility - output: pipelineArtifact - displayName: 'Publish Pipeline PythonPip3Dsc' + displayName: "Publish Pipeline PythonPip3Dsc" targetPath: $(Build.SourcesDirectory)\resources\PythonPip3Dsc\ artifactName: PythonPip3Dsc - output: pipelineArtifact - displayName: 'Publish Pipeline YarnDsc' + displayName: "Publish Pipeline YarnDsc" targetPath: $(Build.SourcesDirectory)\resources\YarnDsc\ artifactName: YarnDsc - output: pipelineArtifact - displayName: 'Publish Pipeline NpmDsc' + displayName: "Publish Pipeline NpmDsc" targetPath: $(Build.SourcesDirectory)\resources\NpmDsc\ artifactName: NpmDsc - output: pipelineArtifact - displayName: 'Publish Pipeline Microsoft.WindowsSandbox.DSC' + displayName: "Publish Pipeline Microsoft.Windows.Setting.Language" + targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Setting.Language\ + artifactName: Microsoft.Windows.Setting.Language + - output: pipelineArtifact + displayName: "Publish Pipeline Microsoft.WindowsSandbox.DSC" targetPath: $(Build.SourcesDirectory)\resources\Microsoft.WindowsSandbox.DSC\ artifactName: Microsoft.WindowsSandbox.DSC - output: pipelineArtifact - displayName: 'Publish Pipeline GitDsc' + displayName: "Publish Pipeline GitDsc" targetPath: $(Build.SourcesDirectory)\resources\GitDsc\ artifactName: GitDsc - output: pipelineArtifact - displayName: 'Publish Pipeline Microsoft.VSCode.Dsc' + displayName: "Publish Pipeline Microsoft.VSCode.Dsc" targetPath: $(Build.SourcesDirectory)\resources\Microsoft.VSCode.Dsc\ artifactName: Microsoft.VSCode.Dsc - output: pipelineArtifact - displayName: 'Publish Pipeline Microsoft.DotNet.Dsc' + displayName: "Publish Pipeline Microsoft.DotNet.Dsc" targetPath: $(Build.SourcesDirectory)\resources\Microsoft.DotNet.Dsc\ artifactName: Microsoft.DotNet.Dsc @@ -87,10 +91,10 @@ extends: fetchTags: false - task: PowerShell@2 - displayName: 'Run Pester tests for DSC modules' + displayName: "Run Pester tests for DSC modules" inputs: pwsh: true - targetType: 'inline' + targetType: "inline" script: | $env:PSModulePath += ";$(Build.SourcesDirectory)\resources" Invoke-Pester -CI @@ -99,6 +103,6 @@ extends: - task: PublishTestResults@2 inputs: - testResultsFormat: 'NUnit' - testResultsFiles: '**/Test*.xml' + testResultsFormat: "NUnit" + testResultsFiles: "**/Test*.xml" failTaskOnFailedTests: true diff --git a/resources/Help/Microsoft.Windows.Setting.Language/DisplayLanguage.md b/resources/Help/Microsoft.Windows.Setting.Language/DisplayLanguage.md new file mode 100644 index 00000000..81741c43 --- /dev/null +++ b/resources/Help/Microsoft.Windows.Setting.Language/DisplayLanguage.md @@ -0,0 +1,36 @@ +--- +external help file: Microsoft.Windows.Setting.Language.psm1-Help.xml +Module Name: Microsoft.Windows.Setting.Language +ms.date: 11/04/2024 +online version: +schema: 2.0.0 +title: DisplayLanguage +--- + +# DisplayLanguage + +## SYNOPSIS + +The `DisplayLanguage` DSC Resource allows you to set the display language on your local Windows machine. + +## DESCRIPTION + +The `DisplayLanguage` DSC Resource allows you to set the display language on your local Windows machine. + +## PARAMETERS + +| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | +| ------------- | ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `Name` | Mandatory | String | The name of the language. This is the language tag that represents the language. For example, `en-US` represents English (United States). | Use the `Get-WinUserLanguageList` to see which language packs have been installed. | +| `Exist` | Optional | Boolean | Indicates whether the language should exist. The default value is `$true`. | `$true`, `$false` | + +## EXAMPLES + +### EXAMPLE 1 - Set the display language to English (United States) + +```powershell +$params = @{ + Name = 'en-US' +} +Invoke-DscResource -Name DisplayLanguage -Method Set -Property $params -ModuleName Microsoft.Windows.Setting.Language +``` diff --git a/resources/Help/Microsoft.Windows.Setting.Language/Language.md b/resources/Help/Microsoft.Windows.Setting.Language/Language.md new file mode 100644 index 00000000..d749200b --- /dev/null +++ b/resources/Help/Microsoft.Windows.Setting.Language/Language.md @@ -0,0 +1,36 @@ +--- +external help file: Microsoft.Windows.Setting.Language.psm1-Help.xml +Module Name: Microsoft.Windows.Setting.Language +ms.date: 11/04/2024 +online version: +schema: 2.0.0 +title: Language +--- + +# Language + +## SYNOPSIS + +The `Language` DSC Resource allows you to install, update, and uninstall languages on your local Windows machine. + +## DESCRIPTION + +The `Language` DSC Resource allows you to install, update, and uninstall languages on your local Windows machine. + +## PARAMETERS + +| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | +| ------------- | ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `LanguageId` | Mandatory | String | The name of the language. This is the language tag that represents the language. For example, `en-US` represents English (United States). | To get a full list of languages available, use the `[System.Globalization.CultureInfo]::GetCultures('AllCultures')` method. | +| `Exist` | Optional | Boolean | Indicates whether the language should exist. The default value is `$true`. | `$true`, `$false` | + +## EXAMPLES + +### EXAMPLE 1 - Install the English (United States) language + +```powershell +$params = @{ + LanguageId = 'en-US' +} +Invoke-DscResource -Name Language -Method Set -Property $params -ModuleName Microsoft.Windows.Setting.Language +``` diff --git a/resources/Help/Microsoft.Windows.Setting.Language/Region.md b/resources/Help/Microsoft.Windows.Setting.Language/Region.md new file mode 100644 index 00000000..9d48258c --- /dev/null +++ b/resources/Help/Microsoft.Windows.Setting.Language/Region.md @@ -0,0 +1,34 @@ +--- +external help file: Microsoft.Windows.Setting.Language.psm1-Help.xml +Module Name: Microsoft.Windows.Setting.Language +ms.date: 11/04/2024 +online version: +schema: 2.0.0 +title: Region +--- + +# Region + +## SYNOPSIS + +The `Region` DSC Resource allows you to set the region settings on your local Windows machine. + +## DESCRIPTION + +The `Region` DSC Resource allows you to set the region settings on your local Windows machine. + +## PARAMETERS + +| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** | +| -------------- | --------------- | ------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `GeoId` | Mandatory | String | The geographical ID that represents the region. This is used to set the home location. | For a full list of geographical IDs, refer to the following link: https://learn.microsoft.com/en-us/windows/win32/intl/table-of-geographical-locations | +| `HomeLocation` | NonConfigurable | String | The home location of the region. This is a read-only property. | | +| `Exist` | Optional | Boolean | Indicates whether the language should exist. The default value is `$true`. | `$true`, `$false` | + +## EXAMPLES + +### EXAMPLE 1 - Set the region to United States + +```powershell +Invoke-DscResource -ModuleName Microsoft.Windows.Setting.Language -Name Region -Method Set -Property @{ GeoId = '244' } +``` diff --git a/resources/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.psd1 b/resources/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.psd1 new file mode 100644 index 00000000..778595fe --- /dev/null +++ b/resources/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.psd1 @@ -0,0 +1,135 @@ +# +# Module manifest for module 'Microsoft.Windows.Setting.Language' +# +# Generated by: Microsoft Corporation +# +# Generated on: 04/11/2024 +# + +@{ + + # Script module or binary module file associated with this manifest. + RootModule = 'Microsoft.Windows.Setting.Language.psm1' + + # Version number of this module. + ModuleVersion = '0.1.0' + + # Supported PSEditions + # CompatiblePSEditions = @() + + # ID used to uniquely identify this module + GUID = '6ab8bbf6-ce28-4d33-a3ce-04c1cc16f139' + + # Author of this module + Author = 'Microsoft Corporation' + + # Company or vendor of this module + CompanyName = 'Microsoft Corporation' + + # Copyright statement for this module + Copyright = '(c) Microsoft Corporation. All rights reserved.' + + # Description of the functionality provided by this module + Description = 'DSC Resource for Windows Setting Language' + + # Minimum version of the PowerShell engine required by this module + PowerShellVersion = '7.2' + + # Name of the PowerShell host required by this module + # PowerShellHostName = '' + + # Minimum version of the PowerShell host required by this module + # PowerShellHostVersion = '' + + # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. + # DotNetFrameworkVersion = '' + + # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. + # ClrVersion = '' + + # Processor architecture (None, X86, Amd64) required by this module + # ProcessorArchitecture = '' + + # Modules that must be imported into the global environment prior to importing this module + # RequiredModules = @() + + # Assemblies that must be loaded prior to importing this module + # RequiredAssemblies = @() + + # Script files (.ps1) that are run in the caller's environment prior to importing this module. + # ScriptsToProcess = @() + + # Type files (.ps1xml) to be loaded when importing this module + # TypesToProcess = @() + + # Format files (.ps1xml) to be loaded when importing this module + # FormatsToProcess = @() + + # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess + # NestedModules = @() + + # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. + # FunctionsToExport = '*' + + # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. + # CmdletsToExport = '*' + + # Variables to export from this module + # VariablesToExport = '*' + + # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. + # AliasesToExport = '*' + + # DSC resources to export from this module + DscResourcesToExport = @('Language', 'DisplayLanguage', 'Region') + + # List of all modules packaged with this module + # ModuleList = @() + + # List of all files packaged with this module + # FileList = @() + + # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. + PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = @( + 'PSDscResource_Language', + 'PSDscResource_DisplayLanguage' + ) + + # A URL to the license for this module. + LicenseUri = 'https://github.com/microsoft/winget-dsc/blob/main/LICENSE' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/microsoft/winget-dsc' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + # Prerelease string of this module + Prerelease = 'alpha' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + + } # End of PrivateData hashtable + + # HelpInfo URI of this module + # HelpInfoURI = '' + + # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. + # DefaultCommandPrefix = '' + +} + diff --git a/resources/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.psm1 b/resources/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.psm1 new file mode 100644 index 00000000..5b5fb7b4 --- /dev/null +++ b/resources/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.psm1 @@ -0,0 +1,286 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +using namespace System.Collections.Generic + +# Import the LanguagePackManagement module for helper functions +Import-Module LanguagePackManagement -Force -ErrorAction SilentlyContinue + +#region Functions +function Test-LanguagePackAvailability { + param ( + [Parameter(Mandatory = $true)] + [string]$Language + ) + + # Do not rely on Get-WindowsCapability as it requires elevation + it can take time to run + $languagePacks = Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -ExpandProperty MUILanguages + + if ($null -eq $languagePacks) { + return $false + } + + if ($languagePacks -notcontains $Language) { + return $false + } + + return $true +} + +function Test-UserLanguageList { + param ( + [Parameter(Mandatory = $true)] + [string]$Language + ) + + $localeList = Get-WinUserLanguageList + + if ($null -eq $localeList) { + return $false + } + + if ($localeList.LanguageTag -notcontains $Language) { + return $false + } + + return $false +} + +function Get-LanguageList { + $languageList = Get-Language + $out = [List[Language]]::new() + + foreach ($language in $languageList) { + $language = [Language]::new($language.LanguageId, $true) + $out.Add($language) + } + + return $out +} +#endregion Functions + +#region Classes +<# +.SYNOPSIS + The `Language` DSC Resource allows you to install, update, and uninstall languages on your local Windows machine. + +.PARAMETER LanguageId + The name of the language ID. This is the language tag that represents the language. For example, `en-US` represents English (United States). + To get a full list of languages available, use the `[System.Globalization.CultureInfo]::GetCultures('AllCultures')` method. + +.PARAMETER Exist + Indicates whether the package should exist. Defaults to $true. + +.EXAMPLE + PS C:\> Invoke-DscResource -ModuleName Microsoft.Windows.Setting.Language -Name Language -Method Set -Property @{ LanguageId = 'en-GB' } + + This example installs the English (United Kingdom) language pack on the user's machine. +#> +[DscResource()] +class Language { + [DscProperty(Key)] + [string] $LanguageId + + [DscProperty()] + [bool] $Exist = $true + + static [hashtable] $InstalledLanguages + + Language() { + [Language]::GetInstalledLanguages() + } + + Language([string] $LanguageId, [bool] $Exist) { + $this.LanguageId = $LanguageId + $this.Exist = $Exist + } + + [Language] Get() { + $currentState = [Language]::InstalledLanguages[$this.LanguageId] + + if ($null -ne $currentState) { + return $currentState + } + + return @{ + LanguageId = $this.LanguageId + Exist = $false + } + } + + [void] Set() { + if ($this.Test()) { + return + } + + if ($this.Exist) { + # use the LanguagePackManagement module to install the language (requires elevation). International does not have a cmdlet to install language + Install-Language -Language $this.LanguageId + } else { + Uninstall-Language -Language $this.LanguageId + } + } + + [bool] Test() { + $currentState = $this.Get() + + if ($currentState.Exist -ne $this.Exist) { + return $false + } + + return $true + } + + static [Language[]] Export() { + return Get-LanguageList + } + + #region Language helper functions + static [void] GetInstalledLanguages() { + [Language]::InstalledLanguages = @{} + + foreach ($language in [Language]::Export()) { + [Language]::InstalledLanguages[$language.LanguageId] = $language + } + } + #endRegion Language helper functions +} + +<# +.SYNOPSIS + The `DisplayLanguage` DSC Resource allows you to set the display language on your local Windows machine. + +.PARAMETER Name + The name of the display language. This is the language tag that represents the language. For example, `en-US` represents English (United States). + +.PARAMETER Exist + Indicates whether the display language should be set. Defaults to $true. + +.EXAMPLE + PS C:\> Invoke-DscResource -ModuleName Microsoft.Windows.Setting.Language -Name DisplayLanguage -Method Set -Property @{ LocaleName = 'en-US' } + + This example sets the display language to English (United States) on the user. +#> +[DscResource()] +class DisplayLanguage { + + [DscProperty(Key)] + [string] $Name + + [DscProperty()] + [bool] $Exist = $true + + DisplayLanguage() { + # Don't rely on the registry key to determine the current display language nor the user locale + $this.Name = (Get-WinSystemLocale).Name + $this.Exist = $true + } + + [DisplayLanguage] Get() { + $currentState = [DisplayLanguage]::new() + + if ($currentState.Name -ne $this.Name) { + $currentState.Exist = $false + } + + return $currentState + } + + [void] Set() { + if ($this.Test()) { + return + } + + if (Test-LanguagePackAvailability -Language $this.Name) { + if (-not (Test-UserLanguageList)) { + # The language is installed through different means + # To reflect the language in the immersive control panel, we need to add it to the user language list + $existingList = Get-WinUserLanguageList + $existingList.Add($this.Name) + Set-WinUserLanguageList -LanguageList $existingList + } + Set-WinUILanguageOverride -Language $this.Name + } + } + + [bool] Test() { + $currentState = $this.Get() + + if ($currentState.Exist -ne $this.Exist) { + return $false + } + + return $true + } +} + +<# +.SYNOPSIS + The `Region` DSC Resource allows you to set the region settings on your local Windows machine. + +.PARAMETER GeoId + The geographical ID that represents the region. This is used to set the home location. + +.PARAMETER HomeLocation + The home location of the region. This is a read-only property. + +.PARAMETER Exist + Indicates whether the region settings should exist. Defaults to $true. + +.EXAMPLE + PS C:\> Invoke-DscResource -ModuleName Microsoft.Windows.Setting.Language -Name Region -Method Set -Property @{ GeoId = '244' } + + This example sets the region to the geographical ID 244 on the user's machine, which is the United States. + +.NOTES + For a full list of geographical IDs, refer to the following link: https://learn.microsoft.com/en-us/windows/win32/intl/table-of-geographical-locations +#> +[DscResource()] +class Region { + [DscProperty(Key)] + [string] $GeoId + + [DscProperty(NotConfigurable)] + [string] $HomeLocation + + [DscProperty()] + [bool] $Exist = $true + + Region() { + # Get the current region settings + $region = Get-WinHomeLocation + + # Set the properties + $this.GeoId = $region.GeoId + $this.HomeLocation = $region.HomeLocation + $this.Exist = $true + } + + [Region] Get() { + $currentState = [Region]::new() + + if ($currentState.GeoId -ne $this.GeoId) { + $currentState.Exist = $false + } + + return $currentState + } + + [void] Set() { + if ($this.Test()) { + return + } + Set-WinHomeLocation -GeoId $this.GeoId + } + + [bool] Test() { + $currentState = $this.Get() + + if ($currentState.Exist -ne $this.Exist) { + return $false + } + + return $true + } +} +#endRegion classes diff --git a/tests/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.Tests.ps1 b/tests/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.Tests.ps1 new file mode 100644 index 00000000..520d5ac5 --- /dev/null +++ b/tests/Microsoft.Windows.Setting.Language/Microsoft.Windows.Setting.Language.Tests.ps1 @@ -0,0 +1,83 @@ +using module Microsoft.Windows.Setting.Language + +$ErrorActionPreference = 'Stop' +Set-StrictMode -Version Latest + +<# +.Synopsis + Pester tests related to the Microsoft.Windows.Setting.Language PowerShell module. +#> + +BeforeAll { + Import-Module Microsoft.Windows.Setting.Language -Force -ErrorAction SilentlyContinue + # Import the language pack for functions + Import-Module LanguagePackManagement -Force -ErrorAction SilentlyContinue +} + +Describe 'List available DSC resources' { + It 'Shows DSC Resources' { + $expectedDSCResources = @('Language', 'DisplayLanguage', 'Region') + $availableDSCResources = (Get-DscResource -Module Microsoft.Windows.Setting.Language).Name + $availableDSCResources.count | Should -Be 3 + $availableDSCResources | Where-Object { $expectedDSCResources -notcontains $_ } | Should -BeNullOrEmpty -ErrorAction Stop + } +} + +Describe 'Language' { + It 'Install a preferred language' -Skip:(!$IsWindows) { + $desiredState = @{ + LanguageId = 'en-GB' + } + + Invoke-DscResource -Name Language -ModuleName Microsoft.Windows.Setting.Language -Method Set -Property $desiredState + + $finalState = Invoke-DscResource -Name Language -ModuleName Microsoft.Windows.Setting.Language -Method Get -Property $desiredState + $finalState.Exist | Should -BeTrue + } + + It 'Uninstall a preferred language' -Skip:(!$IsWindows) { + $desiredState = @{ + LanguageId = 'en-GB' + } + + Invoke-DscResource -Name Language -ModuleName Microsoft.Windows.Setting.Language -Method Set -Property $desiredState + + $finalState = Invoke-DscResource -Name Language -ModuleName Microsoft.Windows.Setting.Language -Method Get -Property $desiredState + $finalState.Exist | Should -BeFalse + } + + It 'Export all languages' -Skip:(!$IsWindows) { + + $class = [Language]::new() + + $currentLanguages = $class::Export() + $currentLanguages | Should -Not -BeNullOrEmpty + $currentLanguages.Count | Should -BeGreaterThan 0 + } +} + +Describe 'DisplayLanguage' { + It 'Set a preferred language' -Skip:(!$IsWindows) { + $desiredState = @{ + Name = 'en-US' + } + + Invoke-DscResource -Name DisplayLanguage -ModuleName Microsoft.Windows.Setting.Language -Method Set -Property $desiredState + + $finalState = Invoke-DscResource -Name DisplayLanguage -ModuleName Microsoft.Windows.Setting.Language -Method Get -Property $desiredState + $finalState.Exist | Should -BeTrue + } +} + +Describe 'Region' { + It 'Set a preferred region' -Skip:(!$IsWindows) { + $desiredState = @{ + GeoId = '244' + } + + Invoke-DscResource -Name Region -ModuleName Microsoft.Windows.Setting.Language -Method Set -Property $desiredState + + $finalState = Invoke-DscResource -Name Region -ModuleName Microsoft.Windows.Setting.Language -Method Get -Property $desiredState + $finalState.Exist | Should -BeTrue + } +}