Advertisement
Cogger

Rip_Download.ps1

Sep 22nd, 2021 (edited)
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Clear-Host
  2. Write-Host('Make Sure to Start in the directory you want the file downloaded in...') -Fore White
  3. $URL = Read-Host -Prompt 'Please Paste the download link'
  4. $DownloadLink2 = (Invoke-WebRequest -Uri $URL -UseBasicParsing).Links | sort-object href -Unique | Select-Object href | Select-String -Pattern 'https://download' -SimpleMatch
  5. $DownloadLink1 = $DownloadLink2 -replace "@{href=" -replace "" ; $Source = $DownloadLink1 -replace "}" -replace ""
  6. $DIR = 'C:\OfficeSetup' ; $APP = ($Source.Split('/',6) | Select -Index 5) ; $DIRAPP = $DIR + "\" + $APP
  7. Start-BitsTransfer -Source $Source -Destination $DIRAPP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement