Trying to update media item field through script .In the csv file I have item name for uploaded images that needs to be updated in the Imagefield
script:
$AllPhotoGallery = Get-ChildItem -Path "master://sitecore/media library/Images/photo-gallery" -Recurse
$Mediaimage = $AllPhotoGallery | Where-Object { $_."DisplayName" -eq $PropertyPhotoName };
$ID = $Property."Photos"
$Property.Editing.BeginEdit();
$Property["Photos"] = $ID; #Here