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.

Tagged as: , No Comments
31Jan/120

Commandline completition

Yesterday I had one of this moments where a small click changes the world of the person next to you. And at the first moment, you don't know why.

So what happend? While working in the commandline, full directory-paths appeared on the screen, without having been typed in by me. Some of you might say: "That's normal, it always was with windows command-line, this is not MS-DOS. "

For those who don't know the feature I am talking about, I will give a short explanation: In command-line (and Powershell) it is possible to use the <TAB>-Key to complete the currently written folder-path or file-name. If there are more the one possible completition available the first one will be used. If you know press <TAB> a second time, it will change the completition to the next one.

Hopefully this will help some of you out there 😉

 

Tagged as: , , No Comments
   
%d bloggers like this: