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