Search found 34 matches

by gareth.jacobs
Sat Apr 29, 2023 4:56 am
Forum: PowerShell Studio
Topic: Format Script Breaks Code
Replies: 2
Views: 1817

Format Script Breaks Code

Product: PowerShell Studio 2023 (64 Bit) Build: v5.8.221 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.19045.0 The following code block will generate a syntax error if 'format script' is used. The 'elseif...' line gets pulled up 1 line and becomes a comment, breaking the code. if($a -eq 1) { $y = ...
by gareth.jacobs
Tue Dec 20, 2022 1:30 am
Forum: PowerShell
Topic: Error when running script
Replies: 2
Views: 3627

Re: Error when running script

You can do SQL calls, you just have to frame the code a slightly different way, as follows: function Exec-get_system_information { $Query = @" DECLARE @MacAddress varchar(20); EXEC [$ProgramName].[dbo].[get_system_information]; "@ ExecuteQuery -QueryString $Query } Here this code sets up t...
by gareth.jacobs
Sun Sep 11, 2022 3:59 pm
Forum: PowerShell Studio
Topic: Script Formatting Introduces Coding Error
Replies: 5
Views: 1831

Re: Script Formatting Introduces Coding Error

Tested on updated version - problem fixed.

Thanks
g
by gareth.jacobs
Wed Aug 17, 2022 1:58 pm
Forum: PowerShell Studio
Topic: Script Formatting Introduces Coding Error
Replies: 5
Views: 1831

Re: Script Formatting Introduces Coding Error

Settings as requested
editor_settings.jpg
editor_settings.jpg (84.23 KiB) Viewed 1659 times
by gareth.jacobs
Tue Aug 09, 2022 10:45 pm
Forum: PowerShell Studio
Topic: Script Formatting Introduces Coding Error
Replies: 5
Views: 1831

Script Formatting Introduces Coding Error

Product: PowerShell Studio 2022 (64 Bit) Build: v5.8.209 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.19043.0 Formatting introduces a coding error in a specific circumstance. Here is the not particularly well formatted, but working code portion prior to formatting: if ($FileOpenTrue) { Remove-Ite...
by gareth.jacobs
Tue Oct 27, 2020 4:26 pm
Forum: PowerShell Studio
Topic: Windows Form Message Box Anomaly
Replies: 2
Views: 1177

Re: Windows Form Message Box Anomaly

This message is generated by PowerShell. From my understanding, we do not suppress any output from PowerShell. I'll talk to the development team and get back to you. In the meantime, please try adding the following line to your script: $ProgressPreference = 'SilentlyContinue' That did it. I placed ...
by gareth.jacobs
Wed Oct 21, 2020 10:38 pm
Forum: PowerShell Studio
Topic: Windows Form Message Box Anomaly
Replies: 2
Views: 1177

Windows Form Message Box Anomaly

Product: PowerShell Studio 2020 (64 Bit) Build: v5.7.181 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.19041.0 I created a Windows Form project. In it, the O365 function Get-EXOMailbox is called and returns a value to a variable as expected. However, a Windows form messagebox is also splashed with...
by gareth.jacobs
Wed Sep 02, 2020 2:13 pm
Forum: PowerShell Studio
Topic: Validate Range Error for Int64 Max Value
Replies: 2
Views: 1460

Re: Validate Range Error for Int64 Max Value

Thanks - just note that I did not test other values - just Int64.
by gareth.jacobs
Tue Sep 01, 2020 5:35 pm
Forum: PowerShell Studio
Topic: Validate Range Error for Int64 Max Value
Replies: 2
Views: 1460

Validate Range Error for Int64 Max Value

Product: PowerShell Studio 2020 (64 Bit) Build: v5.7.181 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.19041.0 When adding ValidateRange in a function to an Int64 variable, it incorrectly assumes the value for an Int32 maxvalue (2147483647) and rejects the Int64 maxvalue entry of 92233720368547758...
by gareth.jacobs
Sat Jul 25, 2020 7:45 pm
Forum: Customer Service
Topic: Compiled .EXE Content Security
Replies: 2
Views: 3268

Re: Compiled .EXE Content Security

Understand now that it is wrapped and obfuscated rather than compiled - makes sense why it generates the .EXE so quickly.

Thanks for the info.

Cheers
G