REST Sevice Script do not work as EXE.

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
nikolay
Posts: 9
Last visit: Sun Nov 17, 2019 10:50 pm

REST Sevice Script do not work as EXE.

Post by nikolay »

Hello, friends!! I have some script that work with REST API. (Invoke-RestMethod)
I tested it in powershell.All works. But when i want tp create exe file for this script (use powwershell studio) it does not work.
I tried to debug program, when I start bebug - all works - > program start - go to the API service - download all i need.
But when a build project and start exe file it does not work. So. Is it possible to work with restmethod when i use exe files?
Thank you!!!
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: REST Sevice Script do not work as EXE.

Post by jvierra »

There is no reason for it to not work. It is likely a firewall issue. Be sure the firewall allows you EXE to make outbound connections.
This topic is 4 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked