diff --git a/install-windows.ps1 b/install-windows.ps1 index 1787686..2582546 100644 --- a/install-windows.ps1 +++ b/install-windows.ps1 @@ -260,10 +260,9 @@ function Copy-DirectoryContent { New-Item -Path $Destination -ItemType Directory -Force | Out-Null } - # Copy all items - Get-ChildItem -Path $Source -Force | ForEach-Object { - Copy-Item -Path $_.FullName -Destination $Destination -Recurse -Force -ErrorAction SilentlyContinue - } + # Copy all contents from source to destination + # Using -Container to properly handle nested directories + Copy-Item -Path "$Source\*" -Destination $Destination -Recurse -Force -ErrorAction SilentlyContinue return $true } return $false