Forum Discussion
SamuelBlättler
Dec 23, 2022Copper Contributor
Issue with Install-Language cmdlet when used in Win32 Intune package
I wrote a small PowerShell script that installs 3 language packages to a Windows 11 22H2 client.
This script needs to run elevated. During testing, I used Psexec64 -s to run the script in system context. As you can see in the screenshot, there are no error messages and language packs were installed successfully via Install-Language cmdlet:
So I created a Win32 app (choose to run installation as System) and deployed it to the same client again. See what I got
=> The command "Install-Language" isn't recognized as cmdlet! Can anybody tell me what I'm doing wrong? Or is this a bug? Thanks for your help!
Found the issue! 32-Bit Powershell can't handle the new language cmdlets!
And Intune Management Extension seems to start a 32 Bit Powershell. But with this code we can enforce a 64 Bit environment and (hopefully) workaround this issue:
- Perhaps import-module LanguagePackManagement first?
- SamuelBlättlerCopper ContributorThanks for your reply! Tried Import-Module LanguagePackManagement before I did the post but did not solve the issue (can't remember the error message)