diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 26432a41f2a62ef2020ee868d55efff0c13bc6db..3402c4bcbaeb89c10a2c8a4e19397e1177262cae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -81,7 +81,7 @@ Fixup manifest:
     PARENT_IMAGES: "openjdk:15-windowsservercore-1809;openjdk:11-windowsservercore-1809;openjdk:8-windowsservercore-1809;openjdk:15-windowsservercore-ltsc2016;openjdk:11-windowsservercore-ltsc2016;openjdk:8-windowsservercore-ltsc2016"
   script:
     - docker info
-    - mkdir -p cache
+    - New-Item cache -ItemType Directory -ea 0
     - cp "build/$CI_PROJECT_NAME" "$CI_PROJECT_NAME"
     # Make the user specify the parent images. I don't feel like figuring out
     # how to automatically figure them out using powershell.
@@ -167,7 +167,7 @@ Bashbrew build - winamd64:
     BASHBREW_ARCH: windows-amd64
   script:
     - docker info
-    - mkdir -p cache
+    - New-Item cache -ItemType Directory -ea 0
     - bashbrew --namespace=$CANONICAL_NAMESPACE$ARCH push $REPO
   cache:
     paths: