Error connecting to IIS server running PU using Visual Studio Code Extension

Hi there,

So as the title says, I’m trying to connect to my PowerShell Universal IIS instance using the extension for Visual Studio Code and I get the following error:


The site is running on https, port 5000, with a server self signed certificate which I then imported to my machine.
Settings are as follows:
“name”: “Puniversal”,
“url”: “https://puniversal.devereandpartners.local:5000”,
“appToken”: “App Token Here”

I tried connecting to the server using invoke-request using the token and got:

StatusCode : 200
StatusDescription : OK

Any ideas please?

Product: PowerShell Universal
Version: 3.0.3

You might be able to try the following setting in your VS Code settings.

            "name": "Local",
            "url": "http://localhost:5000",
            "appToken": "sfdsaf",
            "allowInvalidCertificate": true

Where are you installing the self-signed cert? (machine\user?)

Hi Adam,

I was wondering if there was a similar setting. It didn’t work, however… Still getting the same error.

Regarding the location of the certificate… well, I ended up putting it in both machine and user repos. Basically trying anything at this point. However I still find it strange that I can happily connect to the site using a browser and it won’t complain… but not with Visual Studio Code :-/

I can look into this. We aren’t doing anything too fancy with the extension. The axios package is just being used to query stuff in PSU so there must be some additional configuraition that needs to be done.