You are on page 1of 1

# Change the value of this variable according to where you have the photos store

d.
$PhotoPath = "d:\photos\*.*"
ForEach ($PhotoFile in gci $PhotoPath)
{
$User = '' + $PhotoFile.Name.substring(0, $PhotoFile.Name.Length - 4) + ''
Import-RecipientDataProperty -Identity $User -Picture -FileData ([Byte[]]$(Get-C
ontent -Path $PhotoFile.Fullname -Encoding Byte -ReadCount 0))
}

You might also like