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.
YAML
If you are using YAML for setup this is an easy fix. Just change the pool:vmImage setting to windows-2022
GUI configuration
If you are using the Classic GUI configuration the setting you need to change can be a bit harder to find.
Build pipelines
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.
4. Save
Releases
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.
4. Save
Note: Windows-2022 will be completely rolled out as the default windows-latest 6. March 2022.