PAUSE and CONTINUE added to PowerShell Service Packager Engine

We recently added support for a more refined handling of events in PowerShell based Windows services—allowing for the handling of Start, Stop, and Run events separately.  Please see this article for details. https://www.sapien.com/blog/2018/02/27/new-powershell-service-template-for-primalscript-2018/ The latest service builds of PrimalScript 2018 and PowerShell Studio 2018 include the ability to handle Pause and Continue events. The PowerShell Service […]

Read More

Installing Windows Services Created with PowerShell

Last week we introduced a new PrimalScript template for Windows PowerShell which makes writing Windows Services much easier. In this article, we will show you how to use MSI Builder to create an installer for your Windows Services. We created the services packager engine to allow for self-install / uninstall of a service, but that […]

Read More

New PowerShell Service Template for PrimalScript 2018

PrimalScript 2018 supports advanced functionality for Windows services written in PowerShell and packaged with PrimalScript 2018 or PowerShell Studio 2018. While your old code will still work unmodified with this packager engine as it detects the presence of the new functions, it is a good idea to revamp your code to use the new template. […]

Read More

Write a Windows Service in PowerShell

Previously I showed you the new Windows Application engine (https://www.sapien.com/blog/2017/06/14/new-script-engines-for-windows-powershell/) and the Windows System Tray engine https://www.sapien.com/blog/2017/07/10/creating-a-system-tray-application-with-powershell/. Today I will show you the last of the three new engines, the Windows Service engine. Writing a Windows Service can be a challenging experience, even for a programmer. Generally, unless you do that exact thing for a […]

Read More

Get ServiceAccount Name with ADSI

One drawback to the service objects returned from Get-Service is that you can’t see what account the service is running under, often referred to as the service account. This will be something like LocalService or perhaps even a special user account like Mydomain\svcAccount123. You can retrieve this information by querying Windows Management Instrumentation (WMI) and the Win32_Service class. But did you know you can also use ADSI?

Read More

More fun with services, PowerShell and ADSI

The other day I showed you how to use ADSI and PowerShell to manage services on remote computers. Since the ADSI type adapter is admittedly “kludgy” at times, I put together a script that you could use like a cmdlet to retrieve service information via ADSI.

Read More

Managing Services with PowerShell and ADSI

In PowerShell v1.0, if you want to manage services on a remote computer, you likely used WMI and the Get-WMIObject cmdlet. But there is another solution using ADSI. If you use the WinNT provider, you can access all of the services on a remote machine in much the same way you would manage local users and groups. Let me show you.

Read More

Search

Enter any query and press enter
Advanced search operators:
+ ⟶ Term must appear
- ⟶ Term must not appear
"" ⟶ Exact string must appear
How do I use these?

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

Dashboard