Quantcast
Channel: SAPIEN Forums
Viewing all articles
Browse latest Browse all 311

PowerShell Studio • Error executing script

$
0
0
Product, version and build:
Sapien Powershell Studio 2025
Version 5.9.252
Operating system:
Windows 11 22H2 build 22641.4602
PowerShell version(s):
PSVersion 5.1.22621.4391
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.4391
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

When I put the following function in a blank form:
Running the form through "Home -> Run" the form shows up, no issues.
Running the form through "Deploy -> Run" I get the error showing "Error executing script."
Running the form through "Deploy -> Build & Run" I get the error showing "Error executing script."

Code:

$form1_Load= {#TODO: Initialize Form Controls here}function Get-TESTAuthenticodeSignature{param ([string]$FilePath)$contents = Get-Content $FilePathforeach ($content in $contents){if ($content -eq '# SIG # Begin signature block') { $index = 1 }}return $index}
When removing one of the '#' in the if line it builds and runs ok.
I don't understand why. Can you help me out what I am doing wrong here?

Statistics: Posted by rudirobesin — Wed Jan 22, 2025 4:16 am — Replies 1 — Views 32



Viewing all articles
Browse latest Browse all 311

Trending Articles