I've been trying to put together a PowerShell script to automate Windows setup, and among the things I want to configure is the system language. I've been using a VM to test things but unfortunately I've been hitting a roadblock pretty early on on this avenue since the Install-Language isn't managing to complete properly. Specifically, after running it and waiting a good few minutes for it to complete (which I hear is normal—why does it take so long, anyway?) I get hit with the following error:
Install-Language : Language pack or features could only be partially installed.
ErrorCode: -2146498159. Please try again.
At line:1 char:1
+ Install-Language en-CA
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotInstalled: (:) [Install-Language], Exception
+ FullyQualifiedErrorId : FailedToInstallLanguage,Microsoft.LanguagePackManagement.Powershell.Commands.InstallLanguage
I've been trying on fresh installations of Windows 11 Pro Edition, 24H2, English International ISO on Hyper-V (But I've also tried on VirtualBox to make sure it wasn't an issue on the hypervisor—it wasn't). A peak at CBS.log brings up a "missing payload", but it's hard to imagine why that could be an issue (the machine is connected to the internet and all, and I've tried making sure it's up to date as well).
As mentioned, I've tried on multiple VMs, fresh installations, even tried redownloading the ISO from the official website. I've also tried with different languages. No dice. Really more confused that anything here since it's not like I'm doing anything out of the book here, the function is just not working.
*** Moved from Windows / Windows 11 / Input and language ***