«

»

Print this Post

Remove a “Dynamics NAV Web Client” (Remove-NAVWebServerInstance)

You might have run into this .. trying to remove a Web Server Instance, but not finding a corresponding PowerShell commandlet for that.

As you know, there are LOADS of PowerShell commandlets for server administration. But in the list, there is not a “Remove-NAVWebServerInstance”. This list kind of prooves it:


Is it forgotten? I don’t know… I guess so ..

But I can imagine that people want to remove a NAVWebServerInstance at a given point in time.. .

Do it Manually

Not being too familiar with IIS, it just went for:

  • Deleting the reference in IIS
  • Deleting the corresponding wwwroot folder

And thought that was it.

NOT….

I forgot an important thing: removing the app. It comes down to removing the reference to your Web Server Instance in the “ApplicationHost” file, which can usually be found here: C:\Windows\System32\inetsrv\config\ . You’ll need to do that if you already removed it from IIS. If not removed from IIS? There is a trick you can do, without having to struggle through this file. That is removing the following in this particular order:

  1. Remove the application in IIS:


    You’ll notice that the icon before “WebClient” changes.

  2. Remove the folder in IIS:


  3. Remove the folder in wwwroot


     

With PowerShell

That’s too hard for me .. so I want a PowerShell CmdLet that helps me with this. I was lucky to find out there is a PowerShell ps1 script that you can find in this folder: C:\Program Files\Microsoft Dynamics NAV\80\Web Client\bin . There, you will find the “RemoveWebServerInstance.ps1”. I suppose this is used when you uninstall the Web Client. As this script will remove all WebServiceInstance, I changed it a bit, and turned it into a CmdLet-function, so it can be pipelined in to. Here it is .. Enjoy!

 

 

 

 

5.00 avg. rating (97% score) - 2 votes

Permanent link to this article: http://www.waldo.be/2015/02/03/remove-a-dynamics-nav-web-client-remove-navwebserverinstance/

1 comment

2 pings

  1. Davor

    That was helpful – thank you!

  1. Remove a “Dynamics NAV Web Client” (Remove-NAVWebServerInstance) | Pardaan.com

    […] Bron : Waldo’s Blog Lees meer… […]

Leave a Reply

%d bloggers like this: