Programmatically change Keyboard Layout
<p>I work in a Swiss company environment with <code>de-CH</code> as the standard keyboard-layout, while using a <code>de-DE</code> keyboard.</p>

<p>I'm able to change my keyboard settings manually to the preferred <code>de-DE</code>-layout, set it as standard and and assign a shortscut. </p>

<p>However: somehow my settings disappear after an arbitrary amount of time (might have something to do with updates the administrators run), so I have to repeat this every couple of days.</p>

<p><a href="http://www.capri-technology.be/en/blog/set-keyboard-layout-powershell" rel="nofollow noreferrer">This</a> suggests there's an easy way to change the keyboard-layout with Powershell in Win 8:</p>

<p><code>Set-WinUserLanguageList -LanguageList DE-DE</code></p>

<p>Sadly, I work with Win 7. Therefore, I get the following error message, which, as a Powershell-dummy, I interpret as a plain statement that the cmdlet doesn't exist in Win 7: </p>

<pre><code>PS C:\Users\b036081&gt; Set-WinUserLanguageList -LanguageList DE-DE
Set-WinUserLanguageList : The term 'Set-WinUserLanguageList' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path 
is correct and try again.
At line:1 char:1
+ Set-WinUserLanguageList -LanguageList DE-DE
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Set-WinUserLanguageList:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
</code></pre>

<p>Now, is there another comparably simple way in Powershell? Or even in C++, C#, Batch, VB...</p>

<p>Thanks a lot!</p>