title: VPN connect with PowerShell not work in windows-service
body: <p>I create PowerShell script from VPN connect (this work from powershell):</p>
  
  <pre><code>$vpnName = "VPN_NAME";
  $vpn = Get-VpnConnection -Name $vpnName;
  if($vpn.ConnectionStatus -eq "Disconnected"){
      rasdial $vpnName;
  }
  </code></pre>
  
  <p>Next step: I create Service via <a href="http://nssm.cc" rel="nofollow noreferrer">http://nssm.cc</a>. This is service worked but not connect VPN.</p>
  
  <p>And next step: i convert script "ps1" via "ps2exe.ps1" to "exe". And all the same. Service work but not connect VPN.</p>
  
  <p>How can I fix this? Thank.</p>