RSS

Tag Archives: Proxy

PowerShell – Getting started with Visual Studio Code and GitHub

In the past years I’ve been creating scripts and storing them on my personal OneDrive that is connected to multiple desktops and laptops I use. Additionally, my Synology NAS syncs with OneDrive and backups the files to ChrashPlan.

Even though this works, it has some disadvantages:

  1. OneDrive provides basic version history, but it is limited to just the file at a point in time. When modifying scripts I would need to create a new version and file to ensure I would be able to go back to a previously working version. In the past, especially when I just got started with PowerShell I screwed up code that was working before and that cost me a lot of time to get working again.
  2. The file is only available to me and the people I explicitly share it with. Therefore a lot of general use scripts I’ve created will not be findable and usable by others and I cannot benefit from suggestions/improvements from others which would also help me create better code.

These are the things I plan to solve by using GitHub with Visual Studio Code.

These are the steps I did to get started:

  1. First thing I did, was install Visual Studio Code 1.23.1 (even though I love PowerShell ISE especially with ISE Steroids and will probably still use in parallel). Then I configured it as a replacement for the PowerShell ISE as described by Mike F Robbins in his blog post “How to install Visual Studio Code and configure it as a replacement for the PowerShell ISE”.
  2. Then I created an account on GitHub and followed the Hello World guide to get better acquainted with GitHub and its concepts. At the bottom of this page additional training was offered as a tip: GuidesYouTube Channel and On-Demand Training , but I decided to check this out later.
  3. I then configured Git for Windows and Visual Studio Code by following the blog post Use Git with Visual Studio Code by Brandon Lee.

Everything worked correctly from home and I started following examples shown in “Git Version Control in VS Code”.

When I got at work it did not work anymore however and after some time I got an error in Visual Studio Code stating:
Git: fatal: unable to access ‘https://github.com/bjornhouben/PowerShell.git/’: Failed to connect to github.com port 443: Timed out

Since we use a proxy at work, I quickly figured this would be the most probable cause. So first I determined the proxy server by checking our WPAD file using http://wpad.domain.local/wpad.dat. Then I went on to determine how to configure Visual Studio Code to use the proxy server and came across the articles “Network Connections in Visual Studio Code” and “User and Workspace Settings” , but both did not solve my problem even after restarting Visual Studio Code. Then it hit me that Git For Windows was being used to connect to GitHub. I then quickly found out that I had to run GIT Cmd and configure the proxy using: git config –global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 and after restarting Visual Studio Code it worked correctly again. When I’m working from home without VPN I simply unset the proxy configuration using GIT Cmd using: git config –global –unset http.proxy and restart Visual Studio Code.

Advertisements
 
2 Comments

Posted by on May 28, 2018 in Automation, ICT, Microsoft, Powershell

 

Tags: , , , , , , , ,

Windows 8.1 – Use windows store apps when behind an authenticated proxy

With Windows 8 one of the major issues especially when used in an enterprise was that the Windows Store and Windows Store apps wouldn’t work when you were behind an authenticated proxy unless you specifically allowed URLs to pass through the proxy unauthenticated.

I even created a blog post about this before and since it gets many views I believe it is an issue a lot of people are having.

As such I’m happy to inform you that with Windows 8.1 Preview you can configure your authenticated proxy to be used for Windows Store apps. Press Windows key + W and type “Change proxy settings”.

Win8.1_proxy

The settings from Internet Explorer are also automatically used, so existing configurations set using a GPO work as well.

 
7 Comments

Posted by on July 4, 2013 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , , , , , , , , , , , , , ,

Windows 8 – Use Windows 8 apps when behind a proxy including the Windows 8 Store

In the past I’ve heard numerous people mention they couldn’t get the Windows 8 Store from behind a proxy on the corporate network. Many even thought it was a design flaw by Microsoft and that it wasn’t possible.

A colleague of mine Kuo Wei Lau informed me about this article that specifies how to configure the proxy for metro apps in Windows 8.

So it is possible to use Windows 8 apps from behind a proxy, but I have to admit that in my opinion the configuration is hidden in a not very obvious location. Nevertheless, it is possible 🙂

Apparently there are also other solutions and apparently there are also some issues to take into account. So you might want to take a look at these articles as well:

http://www.thewindowsclub.com/setup-proxy-metro-application-windows-8
http://drdebmath.blogspot.nl/2012/11/use-proxy-windows8-iitg.html
http://support.microsoft.com/kb/2778122

[EDIT 04-07-2014] With Windows 8.1 Preview configuration of the proxy has been improved. For more info take a look at: https://bjornhouben.wordpress.com/2013/07/04/windows-8-1-use-windows-store-apps-when-behind-an-authenticated-proxy/

 
2 Comments

Posted by on March 1, 2013 in ICT, Microsoft, Windows, Windows 8

 

Tags: , , , , , , , ,

 
%d bloggers like this: