I'm trying to programmatically deploy "Basic Typing" for a range of languages via PowerShell to a fleet of Windows PCs. Although I am a coder, I don't have much experience in PowerShell itself.
Looking at these articles:
https://woshub.com/install-language-pack-windows-powershell/
I gather that I want to run something like this:
Install-Language -Language da-DK -ExcludeFeatures OCR, TextToSpeech, Handwriting
However, the above gives me an error:
A positional parameter cannot be found that accepts the argument 'OCR'
I assume that I'm not using the correct syntax/formatting, or the values that I'm using are not correct. Frustratingly, the MS documentation doesn't list the acceptable values for ExcludeFeatures, nor does any of its examples show how it's used.
Any help or advice would be much appreciated, thanks.
I've tried running Install-Language with only OCR or TextToSpeech as an argument for -ExcludeFeatures, but that gives the same error.
I've even tried to just run
Install-Language en-US
But I get an error "Failed to Install Language. Error Code -2147418113". This might be network access or something blocking Windows Updates, so I'll troubleshoot that separately...
-ExcludeFeaturesis a switch parameter (i.e. a boolean flag) - Powershell is treating the subsequent “OCR” etc as separate “positional” parameters and can’t work out what to bind them to. I don’t know how to solve your actual goal, but that’s why you’re getting the error.Install-Language -Language da-DK. Make sure to run this with elevated privileges.