Danjo's two cents NAV, Powershell, Android, C#, Lync, Win8, …

2Feb/120

Creating a service using Powershell in C#

Currently I am modifying the C#/Powershell-project for NAV-Services from the MS Dynamics NAV Team Blog.
(http://blogs.msdn.com/b/nav/archive/2011/09/19/using-powershell-to-configure-dynamics-nav-services.aspx)

While adding some more functionality I realized that it is not quite easy to create new services on a remote computer using powershell.
After some days of searching and testing I succeded using this small piece of code. (It is based on the linked project)

See this MSDN-article for definition of parameters and other StartTypes.

The following two tabs change content below.
Danjo

Danjo

Technical Engineer at TSO-DATA Nürnberg GmbH
Daniel is working as a developer for Microsoft Dynamics NAV since 2007.
Comments (0) Trackbacks (0)

No comments yet.


Leave a Reply

Trackbacks are disabled.

%d bloggers like this: