title: German Umlauts in Powershell called by vbs
body: <p>i do have a ps1 file, which create a Link</p>
  <p><strong>create-link.ps1</strong></p>
  <pre><code>$path = $env:HOMESHARE + &quot;\My Projects\&quot;
  If(!(test-path $path))
  {
      New-Item -ItemType Directory -Force -Path $path
  }
  
  $WshShell = New-Object -comObject WScript.Shell
  $Shortcut = $WshShell.CreateShortcut($env:HOMESHARE + &quot;\My Projects\&quot; + &quot;linkname.lnk&quot;)
  $Shortcut.TargetPath = &quot;\\path\for\link&quot;
  $Shortcut.Description = &quot;äöüß&quot;
  $Shortcut.IconLocation = $env:SYSTEMROOT + &quot;\\system32\\shell32.dll,3&quot;
  $Shortcut.Save()
  </code></pre>
  <p>I also do have a vbs file which calls the ps1</p>
  <p><strong>create-link.vbs</strong></p>
  <pre><code>command = &quot;powershell.exe Get-Content &quot;&quot;C:\path\to\file\create-link.ps1&quot;&quot; | PowerShell.exe -noprofile&quot;
  set shell = CreateObject(&quot;WScript.Shell&quot;)
  shell.Run command,0
  </code></pre>
  <p>Both files are saved with utf-8 encoding.</p>
  <p>This construction was necessary, because the ps1 needed to run completly headless without any noticable things for the user. Calling a ps1 through a vbs solved this problem, if there is a better way i would be happy if you let me know.</p>
  <p>If i am calling the powershell script directly or with &quot;powershell.exe Get-Content &quot;&quot;C:\path\to\file\create-link.ps1&quot;&quot; | PowerShell.exe -noprofile&quot; (by using cmd) everything works fine.
  However, if i call the vbs to do the work it works in general, but the german umlauts from 'Description' are just questions marks, so somehow the encoding got scrambled. Is there any way to fix this?</p>