I am assuming you have the PSU extension installed in your VS Code. From VS Code, you should be able to visit the extensions settings (Ctrl+Shift+X). Once you are in the extension settings for PSU, you will need to enter in the servername/hostname. It’s near the bottom of the settings (pictured).
The token identity is the build in Admin.
I have since made a new identity and made it Administrator and then made a token for this user and copied it in but its the same result:
WARNING: Failed to verify module and server version. Call failed with status code 404 (Not Found): GET http://iweb02/api/v1/version
Your code above is that from the settings.json? It just looks differend then mine.
Since im running on IIS and i am not using domain users or local users (only PowerShell Universal identities) could that cause issues? Do the have have correct permission to the folders on the webserver? The IIS application pool and site uses the local Administrator account so I would guess that there should be access to all folders
Edit:
Could it be my ‘appsettings.json’ that needs to be edited?
My PU installation is here on the webserver C:/PowerShell Universal. In here I have the ‘appsettings.json’ file.
I changed the url here to ‘http://iweb02’ as shown here:
But still I can’t get VScode to connect to my IIS running PU instance
I have IIS and PSU fresh installed, all what you need is to copy and paste apptoken in vscode powershell universal extension and the url should be like this with port number
I have chosen the webservers local admin user here. But this user is not in Powershell Universal.
Maybe I need to add something to the authentication.ps1? I think I have to add the local administrator account as a PU users so that these credentials are used to run dashboards and script, if that is possible?
You dont need to mess with users and creds or anything else, as i mentioned earlier i did a fresh IIS PSU install and didnt need to do anything other than
1-login to psu
2-create an apptoken with role administrator
3-make sure you dont have any conflict modules in windows powershell or powershell 7 if you have it installed.
4-open vscode and install latest release of psu add-on
5-paste in your apptoken and the url in the settings of psu add-on.
I’d remove the duplicates from line 9-13. You connection should show up in the PSU activity pane. There will be a connect button you can press to get it connected using the connection.