From b97e583eab21b82ba973c972a4446345ca60fa8f Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Peters Date: Tue, 18 Apr 2023 11:32:30 +0200 Subject: [PATCH] New-Item should force --- .../DSC_VhdFileDirectory/DSC_VhdFileDirectory.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.psm1 b/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.psm1 index 056fb20..52366ae 100644 --- a/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.psm1 +++ b/source/DSCResources/DSC_VhdFileDirectory/DSC_VhdFileDirectory.psm1 @@ -545,11 +545,11 @@ function SetVHDFile { if ($type -eq 'Directory') { - New-Item -Path $destinationPath -ItemType $type + New-Item -Path $destinationPath -ItemType $type -Force:$force } else { - New-Item -Path $destinationPath -ItemType $type + New-Item -Path $destinationPath -ItemType $type -Force:$force $content | Out-File $destinationPath }