Search found 161 matches

by owinsloe
Mon Mar 18, 2024 12:33 pm
Forum: PowerShell Studio
Topic: get-service startuptype returns nothing
Replies: 5
Views: 33

Re: get-service startuptype returns nothing

Just as a final update. I was still having issues and it was confusing comparing what PSS was doing and executing the same command with powershell shell.

I ended up having to do;
1. initiate the set-service command within pwsh
2. package the script using an elevated manifest
by owinsloe
Sun Mar 17, 2024 6:03 pm
Forum: PowerShell Studio
Topic: get-service startuptype returns nothing
Replies: 5
Views: 33

Re: get-service startuptype returns nothing

Curious...
This resolved my issue
$Services = pwsh -command { get-service -ErrorAction SilentlyContinue | Select-Object Name, Startuptype, Status }
by owinsloe
Sun Mar 17, 2024 5:46 pm
Forum: PowerShell Studio
Topic: get-service startuptype returns nothing
Replies: 5
Views: 33

Re: get-service startuptype returns nothing

Did some more testing and found that if I wrapped the service inside PWSH it does return the results.. ie.. pwsh -command { foreach ($Service in get-service | Select-Object -property Name, Startuptype, Status) { $Name = $Service.name.ToUpper() $Start = $Service.StartupType $State = $service.status W...
by owinsloe
Sun Mar 17, 2024 5:29 pm
Forum: PowerShell Studio
Topic: get-service startuptype returns nothing
Replies: 5
Views: 33

get-service startuptype returns nothing

Product: PowerShell Studio 2024 (64 Bit) Build: v5.8.238 OS: Windows 11.0.22631 PS Version(s): 5.1.22621.1, 7.2.18 PSS seems to drop the StartupType property from get-service cmdlet. It will return starttype but thats no good to me as I want to get my hands on values of 'AutomaticDelayedStart' and s...
by owinsloe
Tue Jan 23, 2024 10:59 am
Forum: PowerShell Studio
Topic: PSS packaging issue
Replies: 4
Views: 1437

Re: PSS packaging issue

Thanks Alexander for your response. The token is loaded by an app which is a UI and not commandline executable. But, you have answered kind of as I expected. I have options, just needed clarification around the process. I am now checking and handling exceptions within my post build exe. Thanks
by owinsloe
Mon Jan 22, 2024 6:55 pm
Forum: PowerShell Studio
Topic: PSS packaging issue
Replies: 4
Views: 1437

Re: PSS packaging issue

Correction... What is occurring is that PSS is identifying that the executable is not signed but it continues to run my post build executable which is moving files in place. It probably should not but interested in your feedback? >> Package 'C:\scripts\cnwpackage.ps1' SAPIEN Package and Deploy Tool ...
by owinsloe
Mon Jan 22, 2024 6:35 pm
Forum: PowerShell Studio
Topic: PSS packaging issue
Replies: 4
Views: 1437

PSS packaging issue

Product: PowerShell Studio 2024 (64 Bit) Build: v5.8.237 OS: Windows 11.0.22631 PS Version(s): 5.1.22621.1, 7.2.18 I am using a code signing token and when I attempt to package a script when I have overlooked loading the token, PSS continues to package the executable unsigned. I would much prefer th...
by owinsloe
Mon Jan 08, 2024 3:18 pm
Forum: PowerShell GUIs
Topic: full output to .txt file
Replies: 1
Views: 9965

Re: full output to .txt file

have a play with something like the following Get-EventLog -logname application -entrytype error -Newest 25 | ft -autosize -wrap | out-file c:\temp\text.txt -width 300 or, just select the objects that you are after if you dont like the formatting. explained here https://stackoverflow.com/questions/4...
by owinsloe
Sun Dec 17, 2023 12:55 pm
Forum: PowerShell GUIs
Topic: Unresponsive form while module loads
Replies: 8
Views: 17924

Re: Unresponsive form while module loads

Also very interested in this. Most of my UI utilities have a 'loading forms, please wait' pop-up, so very keen to avoid that if possible.
by owinsloe
Sun Oct 08, 2023 1:24 pm
Forum: PowerShell Studio
Topic: Pasting source into ps1 files generating errors when run
Replies: 8
Views: 2048

Re: Pasting source into ps1 files generating errors when run

It appears Microsoft have changed the default encoding of notepad.exe to UTF8. It looks like this was a recent update. Quite frustrating.