[Reflection.Assembly]::LoadFile( `
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll')`
| out-null
$FileName = "C:\Temp\ImagesURL.txt";
$Loc = "C:\Temp\Images\"
$ImageName = ""
$wc = New-Object System.Net.WebClient
$content = Get-Content $FileName
foreach ($line in $content)
{
$Image = $Loc + $line.Substring($line.LastIndexOf("/") + 1)
$url = $line
Write-Host $url
Write-Host $Image
$wc.DownloadFile($url, $Image)
}
write-host "Finished successfully."
Wednesday, February 18, 2015
PowerShell - Download Images from Web
I had a requirement where I have to export user profile images from MySite 2013 and I end up writing following PowerShell script:
Subscribe to:
Post Comments (Atom)
-
Following is an example of using Charts.js library to display nice graphs & charts after providing the data via C#/ASP.NET: Download ...
-
You can find the whole API reference for Search REST API here . But when you have to do People Search then you need to put the context aroun...
-
Microsoft introduced Office Graph a couple of months back which uses machine learning techniques to connect people to the relevant content,...
Microsoft Graph vs Office Graph
Microsoft introduced Office Graph a couple of months back which uses machine learning techniques to connect people to the relevant content,...