r2d2r3po

Download via Powershell in Temp Verzeichnis

Hallo,

kann mir jemand helfen wie der Befehl aussehen muss um einen .EXE in das %TEMP% Verzeichnis abzulegen?

Bei diesem Befehl

$downloadLink = "https://gdata-a.akamaihd.net/Q/WEB/B2C/WEU/GDATA_INTERNETSECURITY_WEB_WEU.exe" $destinationPath = $env:"TEMP\GDATA_INTERNETSECURITY_WEB_WEU.exe"   

Bekomme ich diesen Fehler

16-10-2024_18-17-44

Nach dem Download möchte ich das Update von GDATA darüber starten
"%temp%\GDATA_INTERNETSECURITY_WEB_WEU.exe"/_QuietInstallation="true"/_IgnoreReboot="true"  

Gruß, Fred
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 668817

Url: https://administrator.de/forum/download-via-powershell-in-temp-verzeichnis-668817.html

Ausgedruckt am: 26.07.2025 um 16:07 Uhr

150704
Lösung 150704 16.10.2024 aktualisiert um 18:33:43 Uhr
Wo hast du den Quatsch denn zusammenkopiert?? Wenn du zwei separate Zeilen ohne Semikolon hintereinander pratschst kein Wunder das du da nen Fehler kassierst... Und von selbst ohne Download-Anweisung lädt sich die Datei auch nicht herunter face-smile.
$downloadLink = "https://gdata-a.akamaihd.net/Q/WEB/B2C/WEU/GDATA_INTERNETSECURITY_WEB_WEU.exe"  
$destinationPath = joinpath $env:TEMP (split-path $downloadlink -Leaf)
Invoke-WebRequest -uri $downloadlink -outfile $destinationPath -ErrorAction Stop
if (Test-Path $destinationpath -PathType -Leaf){
    &$destinationPath /_QuietInstallation="true" /_IgnoreReboot="true"  
}

Vielleicht doch erst mal die Basics hier abfrühstücken.
learn.microsoft.com/de-de/powershell/scripting/learn/ps101/01-ge ...
r2d2r3po
r2d2r3po 16.10.2024 aktualisiert um 18:46:33 Uhr
$downloadLink = "https://gdata-a.akamaihd.net/Q/WEB/B2C/WEU/GDATA_INTERNETSECURITY_WEB_WEU.exe"
$destinationPath = "$env:TEMP\$(split-path $downloadlink -Leaf)"
Invoke-WebRequest -uri $downloadlink -outfile $destinationPath
&$destinationPath /_QuietInstallation="true" /_IgnoreReboot="true"

Danke Dir. Teste ich mal.

Edit:
geht. 1000 Dank