$homePage = Invoke-WebRequest <ftp https url> $username = "<username here>" $password = "<password here>" $form = $homePage.Forms[0] $form.Fields["username"] = $username $form.Fields["password"] = $password $portalPage = Invoke-WebRequest -Uri $Form.Action -Method POST -Body $Form.Fields -SessionVariable ftp Invoke-WebRequest -Uri "<link to Excel Sheet I want to downlaod" -OutFile <output directory>
Comments