Applies to: Windows Server 2019, 2022 and 2025.
ServerManager cmdlets provide repeatable role installation and report whether a restart is required. Install only the approved workload.
Work from console access or a tested recovery path. Changes to remote access, licensing or domain membership can lock out administrators if prerequisites are wrong. Managed Windows VPS options are available at managed Windows VPS hosting.
Prerequisites
- Identify exact feature names on the target release.
- Confirm Server Core or Desktop Experience compatibility.
- Take a backup and schedule any restart.
- Record dependencies and management tools.
Step-by-step procedure
Step 1: List roles
Query names and installation state.
Get-WindowsFeatureStep 2: Inspect the target
This example examines File Server.
Get-WindowsFeature -Name FS-FileServerStep 3: Install the role
Add management tools when administrators require them.
Install-WindowsFeature -Name FS-FileServer -IncludeManagementToolsStep 4: Review the result
Read Success and RestartNeeded returned by the cmdlet.
Step 5: Restart when necessary
Use Restart-Computer only inside the approved maintenance window.
Verification
The selected feature should report Installed.
Get-WindowsFeature -Name FS-FileServer
Get-WindowsFeature | Where InstallState -eq 'Installed'Rollback
Use Uninstall-WindowsFeature for the role that was added, after evaluating dependent features and workload data.
Version and operational notes
Role availability differs by release and installation option; always query Get-WindowsFeature on the actual server.
Official references
For a hosted environment with setup and onboarding, explore our managed Windows VPS plans.