Get Error when running service generated by Powershell Studio

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

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 2 years and 2 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.
User avatar
jason@sbtc.com.tw
Posts: 26
Last visit: Wed Jan 17, 2024 11:18 pm

Get Error when running service generated by Powershell Studio

Post by jason@sbtc.com.tw »

Product: PowerShell Studio 2021 (64 Bit)
Build: v5.8.196
OS: Windows 10 Pro (64 Bit)
Build: v10.0.19043.0
PowerShell version(s): 5.1.19041.1320

When the service is started, there is an error message in the event log, and the service is not operating.

error message: Line 167: Cannot bind argument to parameter 'Path' because it is null.
Attachments
XintecCleanAttachment.ps1.psbuild
(4.77 KiB) Downloaded 79 times
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Get Error when running service generated by Powershell Studio

Post by Alexander Riedel »

That's a PowerShell error message. You need to look at your code at line 167. Because in the packaging process lines may be added at the top of your code or dot sourced file may be included, the line number may not correspond one to one to your code. But, it should be in the general vicinity.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
jason@sbtc.com.tw
Posts: 26
Last visit: Wed Jan 17, 2024 11:18 pm

Re: Get Error when running service generated by Powershell Studio

Post by jason@sbtc.com.tw »

Thank you very much for your help.
I have found the problem.
Because there are no global parameters in different functions.
This topic is 2 years and 2 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.