Microsoft is deprecating and removing the windows-2016 environments in DevOps in the coming months. Here's how to change the agent environment in your pipelines.
If you are using YAML for setup this is an easy fix. Just change the pool:vmImage setting to windows-2022
If you are using the Classic GUI configuration the setting you need to change can be a bit harder to find.
1. Find your pipeline and click on it.
2. Click Edit in the upper right corner
3. Select Pipeline and in the Agent Specification drop-down pick windows-2022.
1. Go to Releases in your pipeline. Select the pipeline you want to change and click Edit.
2. Click the Tasks tab
3. Select Agent job and in the Agent Specification drop-down pick windows-2022.
Note: Windows-2022 will be completely rolled out as the default windows-latest 6. March 2022.