Skip to content

Deploying to Windows: artifacts, DSC and the container boundary

Verified 1 min read

Ship immutable artifacts, use PowerShell DSC or a pipeline for config, and know when Windows containers help versus when they add work.

Tested onStandard / Datacenter · Build 26100.33650 · x64
E1
Build
26100.33650
Edition
Standard / Datacenter
Architecture
x64
Support
Documentation (E1)
Evidence
E1Official documentation
Verified
2026-10-29
Page type
Method

Three layers:

  1. Artifact — a versioned build (zip/msi/container image), immutable.
  2. Config — DSC/pipeline, not hand edits on the server.
  3. Release — swap/stage, health check, rollback.

If you still copy files over RDP, you cannot answer “what is running?”.

  • Build once, deploy the same bytes to every node.
  • Version it (app-2026.10.29-1), keep a checksum.
  • Include web.config, migrations and static assets.
  • Keep the last N artifacts for rollback.

PowerShell DSC can enforce IIS site/app-pool state:

Terminal window
Configuration WebTier {
Import-DscResource -ModuleName PSDesiredStateConfiguration, WebAdministration
Node 'localhost' {
WindowsFeature IIS { Name = 'Web-Server'; Ensure = 'Present' }
WebAppPool AppPool {
Name = 'apppool'; Ensure = 'Present'
managedRuntimeVersion = ''
}
WebSite Site {
Name = 'app'; PhysicalPath = 'C:\sites\app'
ApplicationPool = 'apppool'; State = 'Started'
Ensure = 'Present'
}
}
}

DSC needs the WebAdministration DSC resources (or xWebAdministration) and a pull/apply story. It is not a one-liner.

  • Deploy to a staging slot/folder; warm up.
  • Switch the site root or binding; keep the old folder.
  • Health check /readyz; roll back on failure.
  • Deploy during low traffic; watch 5xx/latency.

Windows containers can help when:

  • the app is self-contained and Windows-compatible;
  • you need identical dev/prod;
  • you already run container orchestration.

They add work when:

  • the app needs host IIS modules/COM/registry;
  • base image size/version mismatch (Server 2022 vs 2025);
  • you have no registry/patching pipeline.
Terminal window
(Get-Item C:\sites\app\app.dll).VersionInfo.FileVersion
Get-WebSite app | Select-Object Name,PhysicalPath,State

Check the deployed version matches the artifact, and the site root points where you think.

E1. The lab deployed by hand (IIS site, Nginx zip, PHP zip) and did not run DSC or containers. The pipeline is the production method for Server 2025.

Sources