I have a resource like this:
@{
ID='Solutions'Uri='https://somedownloadlink'Filename='Solutions.zip'Expand=$trueDestinationPath='\LabResources'
}The ZIP file contains a single folder called 'Solutions' with approx. 40 files.
When I run the configuration on Windows 11, the VMs receiving that resource end up with a folder c:\LabResources\Solutions containing the files from the ZIP file.
When I run that same configuration on Windows Server 2022, the VMs receiving the resource end up with a folder c:\LabResources containing the files from the ZIP file. The folder Solutions is omitted.
When I change the Destination Path to \LabResource\Solutions, on Windows 11, I get c:\LabResources\Solutions\Solutions, on Windows Server 2022, I get c:\LabResources\Solutions.
I cannot figure out, why this is not running consistently. Moreover, I question, why the script uses complicated calls to the .NET Framework instead of simply using Expand-Archive, which works consistently on both platforms.
I have a resource like this:
The ZIP file contains a single folder called 'Solutions' with approx. 40 files.
When I run the configuration on Windows 11, the VMs receiving that resource end up with a folder c:\LabResources\Solutions containing the files from the ZIP file.
When I run that same configuration on Windows Server 2022, the VMs receiving the resource end up with a folder c:\LabResources containing the files from the ZIP file. The folder Solutions is omitted.
When I change the Destination Path to \LabResource\Solutions, on Windows 11, I get c:\LabResources\Solutions\Solutions, on Windows Server 2022, I get c:\LabResources\Solutions.
I cannot figure out, why this is not running consistently. Moreover, I question, why the script uses complicated calls to the .NET Framework instead of simply using Expand-Archive, which works consistently on both platforms.