diff --git a/windows1809/base/Dockerfile b/windows1809/base/Dockerfile
index 2afe70155546dba2b7856b28817cf81261e770e2..9d255128ef6f776b6e8061c0c0001dcc09a2e3ca 100644
--- a/windows1809/base/Dockerfile
+++ b/windows1809/base/Dockerfile
@@ -2,11 +2,12 @@
 
 FROM microsoft/dotnet-framework:3.5-runtime-windowsservercore-ltsc2019
 
-SHELL ["powershell", "-NoProfile", "-ExecutionPolicy Bypass", "-Command", "$ErrorActionPreference = 'Stop';"]
+SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
+RUN mkdir $PSHome/profile.d | out-null
+ADD powershell/Profile.ps1 /Windows/System32/WindowsPowerShell/v1.0/Profile.ps1
 
-COPY Profile.ps1 C:/Users/ContainerAdministrator/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
-RUN . $Profile; \
-    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
+ADD powershell/Must-Run.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/Must-Run.ps1
+RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
     Invoke-Expression ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
     Must-Run choco install -y dotnetfx --version 4.7.2.20180712; \
     Must-Run choco install -y cmake --version 3.15.5 --installargs "ADD_CMAKE_TO_PATH=System"; \
@@ -22,6 +23,8 @@ RUN . $Profile; \
     Must-Run choco install -y visualstudio2017buildtools; \
     Must-Run choco install -y visualstudio2017-workload-vctools; \
     Start-Process "\"C:/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe\"" -NoNewWindow -Wait -ArgumentList 'modify --installPath \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools\" --quiet --norestart --remove Microsoft.VisualStudio.Component.VC.CMake.Project --add Microsoft.VisualStudio.Component.VC.Tools.14.16 --add Microsoft.VisualStudio.Component.VC.ATL'
+ADD powershell/VSDevEnv.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/VSDevEnv.ps1
+ADD powershell/MSVC-15.9.ps1 /Windows/System32/WindowsPowerShell/v1.0/profile.d/MSVC-15.9.ps1
 
 COPY qtifwsilent.qs C:/qtifwsilent.qs
 RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
diff --git a/windows1809/base/powershell/MSVC-15.9.ps1 b/windows1809/base/powershell/MSVC-15.9.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..3bfbf4b52d6b25c33c4ce13ae8a37e03d01dee98
--- /dev/null
+++ b/windows1809/base/powershell/MSVC-15.9.ps1
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: MIT
+
+VSDevEnv -arch='amd64' -vcvars_ver='14.16'
diff --git a/windows1809/base/Profile.ps1 b/windows1809/base/powershell/Must-Run.ps1
similarity index 90%
rename from windows1809/base/Profile.ps1
rename to windows1809/base/powershell/Must-Run.ps1
index c8dfc1924d1dbfa8b856778f9d4fb5b892beaf6d..34d631c78e9cf43b4a3dfaac45456b6be27543c9 100644
--- a/windows1809/base/Profile.ps1
+++ b/windows1809/base/powershell/Must-Run.ps1
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: MIT
 
 #
 # Sets exit to error when the command fails
diff --git a/windows1809/base/powershell/Profile.ps1 b/windows1809/base/powershell/Profile.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..961a6ed1bdc37b18aeedbe1b6524c27f43949125
--- /dev/null
+++ b/windows1809/base/powershell/Profile.ps1
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: MIT
+ls "$pshome/profile.d/*.ps1" | % { . $_.FullName }
diff --git a/windows1809/base/powershell/VSDevEnv.ps1 b/windows1809/base/powershell/VSDevEnv.ps1
new file mode 100644
index 0000000000000000000000000000000000000000..8dbd9273587092a002f04702d95931b0a8bb4cff
--- /dev/null
+++ b/windows1809/base/powershell/VSDevEnv.ps1
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: MIT
+
+#
+# Sets up Visual Studio Development environment
+#
+function VSDevEnv {
+    pushd "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/Common7/Tools"
+    cmd /c "VsDevCmd.bat $args & set" |
+    foreach {
+        if ($_ -match "=") {
+            $v = $_.split("="); set-item -force -path "ENV:\$($v[0])"  -value "$($v[1])"
+        }
+    }
+    popd
+}
+