@Ben Richards, I know this method and I like it a lot, the code looks very clear. Your code doesn't work for me, I have applied minor improvements and now it works.
# Define variables for readability
$IDMPath = "C:\Program Files (x86)\Internet Download Manager\IDMan.exe"
$DownloadPath = "C:\Users\Andrzej\Desktop\qap 22"
$FileName = "foo bar.exe"
$DownloadURL = "https://www.foobar2000.org/files/foobar2000-x64_v2.24.3.exe"
# Build the argument list as an array to avoid quoting issues
$Arguments = @(
     '/p'
     """$DownloadPath"""
     '/h'
     '/n'
     '/q'
     '/f'
     """$FileName"""
     '/d'
     """$DownloadURL"""
)
# Start IDM with arguments using Start-Process
Start-Process -FilePath $IDMPath -ArgumentList $Arguments -NoNewWindow -Wait
or
# Define variables for readability
$IDMPath = "C:\Program Files (x86)\Internet Download Manager\IDMan.exe"
$DownloadPath = "C:\Users\Andrzej\Desktop\qap 22"
$FileName = "foo bar.exe"
$DownloadURL = "https://www.foobar2000.org/files/foobar2000-x64_v2.24.3.exe"
# Build the argument list as an array to avoid quoting issues
$Arguments = @(
     "/p ""$DownloadPath"""
     '/h'
     '/n'
     '/q'
     "/f ""$FileName"""
     "/d ""$DownloadURL"""
)
# Start IDM with arguments using Start-Process
Start-Process -FilePath $IDMPath -ArgumentList $Arguments -NoNewWindow -Wait