---
title: "Step 9: Remove legacy v6 IIS applications and Windows services – v6 to v7 Migration"
description: "Step 9 of the Nodinite v6 to v7 migration: remove the legacy v6 IIS applications, application pools, and Windows services with the CLI remove-legacy command, then remove the old agent services."
---

# <i class="fal fa-forward-step" aria-hidden="true"></i> Step 9: Remove legacy v6 IIS applications and Windows services

After [Step 8][Step08] has verified v7, remove the old <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> v6 installation: the v6 [Core Services][] [IIS][] applications and application pools, the v6 Logging and Monitoring Windows services, the old TLS web site, and the v6 agent Windows services. The v7 web sites stay untouched.

<aside aria-label="Warning" class="nodinite-note nodinite-note--warning">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-triangle-exclamation"></i> Warning</p>
<div class="nodinite-note__content"><p>Don't run this step before Step 8. Remove v6 only after the agents package from <a href="https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/07-download-and-update-monitoring-agents/">Step 7</a> is installed and v7 is verified.</p></div>
</aside>

## Prerequisites

* [ ] [Step 8 completed – v7 functionality verified][Step08]
* [ ] PowerShell 7 with administrator privileges
* [ ] The extracted agents bundle from Step 7

## Recommended: Remove Legacy with CLI

First, save the v6 agent folders for [Step 13][Step13]: `remove-legacy` deletes the services, and with them the record of where each agent was installed.

```powershell
Get-CimInstance Win32_Service -Filter "Name LIKE 'Nodinite%' AND Name <> 'NodiniteUpdateService'" |
   ForEach-Object { Split-Path -Parent ($_.PathName.Trim('"')) } |
   Sort-Object -Unique | Set-Content -Path "Nodinite-AgentFolders.txt"
```

Then, from the root of the extracted agents bundle, preview the removal, and run it:

```powershell
.\Nodinite.Installer.Cli.exe remove-legacy --config .\nodinite01\config.cli.json --dry-run
.\Nodinite.Installer.Cli.exe remove-legacy --config .\nodinite01\config.cli.json
```

The command reads the environment name and the Legacy <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 6 environment path from the configuration ([Step 1][Step01 Basics]) and runs three phases: it removes the v6 IIS applications, their application pools, and virtual directories; it stops and deletes the old v6 Windows services, including the [Logging Service][], the [Monitoring Service][], and the v6 agent services; and, only when you add `--delete-files`, it deletes the v6 files.

![CLI remove-legacy output with three phases][2]  
*Example of `remove-legacy` removing the v6 [Web Client][], [Web API][], and [Log API][] applications and pools, the v6 Logging and Monitoring Windows services, and skipping file deletion because `--delete-files` was not specified.*  

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p><code>remove-legacy</code> doesn't remove the v6 Install and Update Tool (<code>NodiniteUpdate</code>), a custom v6 TLS web site that you created yourself, or the <a href="https://docs.nodinite.com/logging-and-monitoring/ibm-datapower-gateway/overview/">IBM DataPower</a> and <a href="https://docs.nodinite.com/logging-and-monitoring/microsoft-dynamics-365/overview/">Dynamics CRM</a> agents, which stay on the MSI-based installer and aren't managed by the CLI. Remove <code>NodiniteUpdate</code> with <strong>Programs and Features</strong> in Windows, and the TLS web site as described below.</p></div>
</aside>

## Manual Fallback: Remove via IIS Manager

Use this only when you can't run `remove-legacy`.

### 1. Remove Old v6 Web Applications

![Nodinite v6 web applications in IIS Manager][3]  
*Example of old <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> v6 web applications to remove in IIS Manager.*  

1. Open IIS Manager on the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> application server and expand **Sites**.
2. Find the site hosting the v6 applications, usually Default Web Site.
3. Remove `/Nodinite/ENV/WebClient`, `/Nodinite/ENV/WebAPI`, `/Nodinite/ENV/LogAPI`, and `/NodiniteUpdate/UpdateClient`.

### 2. Remove Old Application Pools

![IIS application pools including v6-era pools][1]  
*Example of v6-era IIS application pools to remove after their web applications are deleted.*  

Remove the v6-era pools, for example `Nodinite - %ENVIRONMENTNAME% - Web API`, only when they have **0** applications. Never remove a pool that serves a v7 web site.

## Remove the Custom v6 TLS Website

In v6, a dedicated IIS web site often terminated TLS. In v7, the CLI binds the certificate to each Core Service web site ([Step 10: Configure TLS][Step10]).

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>Before you remove the custom web site, note its host name and the certificate subject; you enter both in Step 10.</p></div>
</aside>

1. In IIS Manager, identify the custom v6 <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> TLS web site.
2. Remove any web applications under it, then remove the site.
3. Open **Bindings** on Default Web Site and other sites, and remove bindings that use the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> host name or the old certificate.

## Manual Fallback: Remove Old Agent Windows Services

Use this only when you can't run `remove-legacy`, or when v6 agent services remain afterwards in `services.msc`.

### Generate Removal Script

The script lists the remaining `Nodinite*` Windows services, writes a removal script, and saves each service's folder to `Nodinite-AgentFolders.txt` for [Step 13][Step13].

```powershell
try {
   $services = Get-Service | Where-Object { $_.Name -like "Nodinite*" -and $_.Name -ne "NodiniteUpdateService" }
} catch {
   Write-Warning "Some services could not be queried. Continuing with available services."
   $services = @()
}

$outputScript = "Remove-Nodinite-Services.ps1"
Set-Content -Path $outputScript -Value "# Auto-generated script to stop and remove Nodinite Windows services`n"

foreach ($service in $services) {
   Add-Content -Path $outputScript -Value "Stop-Service -Name '$($service.Name)' -Force"
   Add-Content -Path $outputScript -Value "sc.exe delete '$($service.Name)'`n"
}

$folderPaths = foreach ($service in $services) {
   $wmiService = Get-CimInstance Win32_Service -Filter "Name='$($service.Name)'"
   if ($wmiService -and $wmiService.PathName) {
      Split-Path -Parent ($wmiService.PathName.Trim('"'))
   }
}

$folderPaths | Sort-Object -Unique | Set-Content -Path "Nodinite-AgentFolders.txt"
Write-Host "Generated: $outputScript and Nodinite-AgentFolders.txt"
```

### Review and Execute

1. Open `Remove-Nodinite-Services.ps1` and `Nodinite-AgentFolders.txt`, and remove the entries for:
   * environments you are not migrating
   * the [IBM DataPower][DataPower] and [Dynamics CRM][Dynamics] agents, which stay on the MSI-based installer
2. Open PowerShell 7 as administrator and run `./Remove-Nodinite-Services.ps1`.
3. Verify the removal in `services.msc`.

## Completion Checklist

* [ ] `remove-legacy` completed, or the v6 applications and pools removed manually
* [ ] `NodiniteUpdate` removed with Programs and Features
* [ ] Custom v6 TLS web site and old host name bindings removed; host name and certificate subject noted
* [ ] Old v6 agent Windows services removed by `remove-legacy`, or with the manual fallback (IBM DataPower and Dynamics CRM kept)
* [ ] `Nodinite-AgentFolders.txt` saved for [Step 13][Step13]

## Troubleshooting

### Step 10 Fails with Binding Conflict

TLS configuration fails because a host name is still bound in IIS. Check the bindings on all IIS sites and remove duplicate host name bindings before you retry Step 10.

### Cannot Remove an Application Pool

IIS reports that the pool still has applications. Remove the remaining applications first, then restart IIS Manager and retry.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* [<i class="fal fa-forward-step" aria-hidden="true"></i> Step 10: Configure TLS][Step10]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* [Updating from v6 to v7 – Migration Guide][Main]  
* [IIS URL Rewrite – Legacy v6 Redirect][IIS URL Rewrite]  
* [Core Services Overview][Core Services]  
* [IIS Windows Features][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/IMUpdate/Settings/IISAppPools.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/Portal/Env/v6_v7/CLI_RemoveLegacyNodinitev6CoreServices_Success.png
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/IMUpdate/Troubleshooting/NodiniteV6_WebApplications.png

[Core Services]:https://docs.nodinite.com/core-services/overview/
[DataPower]:https://docs.nodinite.com/logging-and-monitoring/ibm-datapower-gateway/overview/
[Dynamics]:https://docs.nodinite.com/logging-and-monitoring/microsoft-dynamics-365/overview/
[IIS]:https://docs.nodinite.com/install-and-update/troubleshooting/iis/overview/
[IIS URL Rewrite]:https://docs.nodinite.com/install-and-update/troubleshooting/iis/iis-url-rewrite-legacy-v6-redirect/
[IIS Windows Features]:https://docs.nodinite.com/install-and-update/troubleshooting/iis/iis-windows-features/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Logging Service]:https://docs.nodinite.com/core-services/logging-service/overview/
[Main]:https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/
[Monitoring Service]:https://docs.nodinite.com/core-services/monitoring-service/overview/
[Step01 Basics]:https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/01-register-environment/#basics-variables
[Step07]:https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/07-download-and-update-monitoring-agents/
[Step08]:https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/08-verify-functionality/
[Step10]:https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/10-configure-tls/
[Step13]:https://docs.nodinite.com/install-and-update/getting-started/version-6/updating-from-v6-to-v7/13-final-cleanup/
[Web API]:https://docs.nodinite.com/core-services/web-api/overview/
[Web Client]:https://docs.nodinite.com/getting-started/overview/