Search found 35 matches
- Thu Apr 04, 2024 7:25 pm
- Forum: PowerShell Studio
- Topic: Write-Host $null -NoNewline Writes a Space
- Replies: 2
- Views: 712
Write-Host $null -NoNewline Writes a Space
Product: PowerShell Studio 2024 (64 Bit) Build: v5.8.238 OS: Windows 10.0.19045 PS Version(s): 5.1.19041.1, 7.4.1 A small, but annoying event occurs when executing the following code: Write-Host "====" Write-Host $null -NoNewline; Write-Host "Test" Write-Host "====" or ...
- Sat Apr 29, 2023 4:56 am
- Forum: PowerShell Studio
- Topic: Format Script Breaks Code
- Replies: 2
- Views: 1828
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 = ...
- Tue Dec 20, 2022 1:30 am
- Forum: PowerShell
- Topic: Error when running script
- Replies: 2
- Views: 3645
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...
- Sun Sep 11, 2022 3:59 pm
- Forum: PowerShell Studio
- Topic: Script Formatting Introduces Coding Error
- Replies: 5
- Views: 1866
Re: Script Formatting Introduces Coding Error
Tested on updated version - problem fixed.
Thanks
g
Thanks
g
- Wed Aug 17, 2022 1:58 pm
- Forum: PowerShell Studio
- Topic: Script Formatting Introduces Coding Error
- Replies: 5
- Views: 1866
Re: Script Formatting Introduces Coding Error
Settings as requested
- Tue Aug 09, 2022 10:45 pm
- Forum: PowerShell Studio
- Topic: Script Formatting Introduces Coding Error
- Replies: 5
- Views: 1866
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...
- Tue Oct 27, 2020 4:26 pm
- Forum: PowerShell Studio
- Topic: Windows Form Message Box Anomaly
- Replies: 2
- Views: 1193
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 ...
- Wed Oct 21, 2020 10:38 pm
- Forum: PowerShell Studio
- Topic: Windows Form Message Box Anomaly
- Replies: 2
- Views: 1193
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...
- Wed Sep 02, 2020 2:13 pm
- Forum: PowerShell Studio
- Topic: Validate Range Error for Int64 Max Value
- Replies: 2
- Views: 1472
Re: Validate Range Error for Int64 Max Value
Thanks - just note that I did not test other values - just Int64.
- Tue Sep 01, 2020 5:35 pm
- Forum: PowerShell Studio
- Topic: Validate Range Error for Int64 Max Value
- Replies: 2
- Views: 1472
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...