[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)
-
Scenario: Updating the Master Page for SharePoint Online is not recommended by Microsoft now.....fine. So how do we change the UI then? And...
-
Microsoft introduced Office Graph a couple of months back which uses machine learning techniques to connect people to the relevant content,...
-
I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...
Official SharePoint Documentation
I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...
No comments:
Post a Comment