> For the complete documentation index, see [llms.txt](https://docs.ispecalgo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ispecalgo.com/en/isa-terminal/kak-ustanovit-algoterminal-isa/obnovleniya-windows-na-vps.md).

# Windows VPS: updates and restarts

A Windows restart interrupts ISA Terminal. While the terminal is closed, bots cannot manage trading. On a server used around the clock, configure update notifications and choose your maintenance time.

## Choose a mode

| Option                                    | Behavior                                                                                                   |
| ----------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Windows Server 2016 and later: mode 7** | Updates download automatically. Windows notifies you before installation and requests a restart afterwards |
| **Mode 2: PowerShell below**              | Windows notifies you before downloading and installing updates                                             |

This changes Windows Update behavior. Install security updates during planned maintenance.

> If Windows already says a restart is required, plan maintenance first. Changing the mode does not cancel a pending restart. Organization or VPS provider policies may impose additional deadlines and rules.

## Option 1. Windows Server policy settings

For Windows Server 2016 and later, Microsoft recommends **7 — Notify for install and notify for restart**.

1. On the server, open **Start**, find `gpedit.msc` and run the Local Group Policy Editor as administrator.
2. Go to **Computer Configuration → Administrative Templates → Windows Components → Windows Update**. On some versions, the setting is inside **Manage end user experience**.
3. Open **Configure Automatic Updates**.
4. Record the previous policy state and selected mode.
5. Select **Enabled**, choose **7 — Notify for install and notify for restart**, then click **Apply**.
6. Open PowerShell as administrator and run:

```powershell
gpupdate /force
```

If the editor or mode 7 is unavailable, use the next option or ask your VPS provider.

## Option 2. PowerShell: notify before download

1. Open PowerShell **on the server running the terminal**: **Start → PowerShell → Run as administrator**.
2. Check the current values and keep the result, for example in a screenshot:

```powershell
Get-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name AUOptions, NoAutoUpdate -ErrorAction SilentlyContinue
```

If the values do not exist, there may be no output. Record whether `AUOptions` was absent or its previous value.

3. Paste the entire block and press **Enter**:

```powershell
$updatePolicyPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU'
if (-not (Test-Path -LiteralPath $updatePolicyPath -ErrorAction Stop)) {
    New-Item -Path $updatePolicyPath -Force -ErrorAction Stop | Out-Null
}
New-ItemProperty -Path $updatePolicyPath -Name AUOptions -Value 2 -PropertyType DWord -Force -ErrorAction Stop | Out-Null
gpupdate /force
```

The existence check is important: `New-Item -Force` on an existing registry key can clear its values. This version creates the key only if absent, then sets `AUOptions` and refreshes Group Policy.

## Verify the result

Repeat the value-check command. Expect **AUOptions : 2** for the PowerShell option, or **AUOptions : 7** for Server mode 7.

Open **Settings → Windows Update** and check the status. On Windows Server the route may be **Update & Security → Windows Update**. A notice that some settings are managed by an organization can also result from a local policy.

The registry value confirms it was saved, not that every possible restart is prevented. If it changes back, the setting has no effect, or `NoAutoUpdate` is already `1`, ask your administrator or provider to review effective policies. Also check for restarts scheduled in the VPS control panel.

Windows active hours do not cover continuous 24/7 operation. An open or disconnected RDP window is not a substitute for update configuration.

## Update the server during maintenance

![Maintenance: stop bots, check the exchange, update Windows, check the terminal](https://4082298987-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKc7Nf016DOaUrQGQAD20%2Fuploads%2Fgit-blob-006a3a5a19d3092c73c00bcd7247e10b3db71f98%2Fwindows-vps-maintenance.svg?alt=media)

1. Choose a time when you can personally check the server after restarting.
2. [Stop bots](/en/isa-terminal/kak-sozdat-i-zapustit-torgovogo-bota/zapusk-i-ostanovka.md) and explicitly decide what to do with open positions. A stopped bot does not manage a retained position.
3. Check positions and active orders **on the exchange**. A “stopped” status alone is insufficient.
4. Close ISA Terminal, install Windows updates and restart as required.
5. Reconnect, sign in to Windows and open ISA Terminal.
6. Check connections, balance, positions, orders and [logs](/en/isa-terminal/baza-znanii/logirovanie-v-isa.md). Resume the required bots and verify their status. Do not assume everything restarts automatically.

## Restore the previous setting

If you used the policy editor, restore the recorded state and run `gpupdate /force`.

If you used PowerShell and `AUOptions` **did not previously exist**, remove only that added value:

```powershell
Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name AUOptions -ErrorAction SilentlyContinue
gpupdate /force
```

If it existed, restore it using the configuration command with the previous number instead of `-Value 2`. Do not delete the entire Windows Update key. Check update settings and scheduled restarts afterwards.

## Sources

* [Microsoft: automatic update modes](https://learn.microsoft.com/en-us/windows/deployment/update/waas-wu-settings#configure-automatic-updates).
* [Microsoft: managing restarts after updates](https://learn.microsoft.com/en-us/windows/deployment/update/waas-restart).
* [Microsoft: New-Item and Force behavior](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/new-item?view=powershell-5.1#example-9-use-the--force-parameter-to-overwrite-existing-files).
