Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download of the ESD failed. #1

Closed
Localuser0 opened this issue Apr 11, 2023 · 5 comments
Closed

Download of the ESD failed. #1

Localuser0 opened this issue Apr 11, 2023 · 5 comments

Comments

@Localuser0
Copy link

Hey

I get this error: Download of the ESD failed.

Udklip

ATP/Defender disabled.

@mtniehaus
Copy link
Owner

Can you try again with the updated zip file here on Github? I haven't seen that issue with my most recent testing. The basic challenge is that it appears the MS CDN doesn't have all the images in all locations, so it can fail to download some images from some locations.

@mtniehaus
Copy link
Owner

It's also possible that the download is failing for other reasons, e.g. lack of disk space. Check the Bits-Client event log to see if any error message was logged.

@mattbalzan
Copy link

Just add logic in your code to check disk space.

@mattbalzan
Copy link

mattbalzan commented Aug 13, 2024

Here’s the code:

# Define the threshold for free space (5 GB)
$threshold = 5GB

# Get the OS drive (assumed to be the drive with the Windows folder)
$osDrive = (Get-WmiObject Win32_OperatingSystem).SystemDrive

# Get the free space on the OS drive
$freeSpace = (Get-PSDrive -Name $osDrive.TrimEnd(':')).Free

# Check if the free space is greater than or equal to the threshold

if ($freeSpace -ge $threshold) {
    Write-Output "The OS drive ($osDrive) has sufficient free space: $([math]::round($freeSpace/1GB, 2)) GB."
} else {
    Write-Output "Warning: The OS drive ($osDrive) has less than 5 GB of free space. Current free space: $([math]::round($freeSpace/1GB, 2)) GB."
}

@mtniehaus
Copy link
Owner

I added logic to check local paths for available free space, and will check before downloading the ESD file whether it will fit. I didn't check to see if the ISO won't fit, but did add error handling that will show when the ISO creation fails.

You can specify a network path for the download; I didn't add logic to check that location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants