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
Search found 161 matches
- Mon Mar 18, 2024 12:33 pm
- Forum: PowerShell Studio
- Topic: get-service startuptype returns nothing
- Replies: 5
- Views: 105
- Sun Mar 17, 2024 6:03 pm
- Forum: PowerShell Studio
- Topic: get-service startuptype returns nothing
- Replies: 5
- Views: 105
Re: get-service startuptype returns nothing
Curious...
This resolved my issue
$Services = pwsh -command { get-service -ErrorAction SilentlyContinue | Select-Object Name, Startuptype, Status }
This resolved my issue
$Services = pwsh -command { get-service -ErrorAction SilentlyContinue | Select-Object Name, Startuptype, Status }
- Sun Mar 17, 2024 5:46 pm
- Forum: PowerShell Studio
- Topic: get-service startuptype returns nothing
- Replies: 5
- Views: 105
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...
- Sun Mar 17, 2024 5:29 pm
- Forum: PowerShell Studio
- Topic: get-service startuptype returns nothing
- Replies: 5
- Views: 105
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...
- Tue Jan 23, 2024 10:59 am
- Forum: PowerShell Studio
- Topic: PSS packaging issue
- Replies: 4
- Views: 1453
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
- Mon Jan 22, 2024 6:55 pm
- Forum: PowerShell Studio
- Topic: PSS packaging issue
- Replies: 4
- Views: 1453
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 ...
- Mon Jan 22, 2024 6:35 pm
- Forum: PowerShell Studio
- Topic: PSS packaging issue
- Replies: 4
- Views: 1453
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...
- Mon Jan 08, 2024 3:18 pm
- Forum: PowerShell GUIs
- Topic: full output to .txt file
- Replies: 1
- Views: 9984
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...
- Sun Dec 17, 2023 12:55 pm
- Forum: PowerShell GUIs
- Topic: Unresponsive form while module loads
- Replies: 8
- Views: 17968
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.
- Sun Oct 08, 2023 1:24 pm
- Forum: PowerShell Studio
- Topic: Pasting source into ps1 files generating errors when run
- Replies: 8
- Views: 2051
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.