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:

[Reflection.Assembly]::LoadFile( `
  | 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."

Microsoft Flow - HTTP REST Call

In this blog post, I will cover what is a workflow and how we can create a workflow using Microsoft Flow that can make HTTP REST calls to br...