Struggeling with Invoke-WebRequest

lupinlicious 136 Reputation points
2023-01-31T11:52:43.47+00:00

Hello,

I'm trying to parse and download BIOS updates from Dell, when I run the script on a Dell OptiPlex 7080 I get the following error. Message: Cannot convert 'System.Object[]' to the type 'System.Uri' required by parameter 'Uri'. Specified method is not supported.

Invoke-WebRequest -Uri'https://downloads.dell.com/Catalog/DellSDPCatalogPC.cab' -OutFile $CabPath -Verbose
		[int32]$n=1
		While(!(Test-Path $CabPath) -and $n -lt '3'){
Invoke-WebRequest -Uri'https://downloads.dell.com/Catalog/DellSDPCatalogPC.cab' -OutFile $CabPath -Verbose
			$n++
		}

Any help would be appreciated!

Best regards

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
850 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,272 questions
{count} votes

6 answers

Sort by: Most helpful
  1. lupinlicious 136 Reputation points
    2023-02-02T07:44:30.0533333+00:00

    Thanks! I'm sorry, I'm not getting this or how to solve this, can I kindly ask you for some assistance on how to write this?