photo import


  • I'm looking for some help on building a powershell script to import photos into AD. So here is my setup: I have a network share with pictures of employees, each jpg is named by an employee ID# "12345.jpg". In AD, we have a custom attribute with "employeeID". I would like to run a script that imports the photo into AD based on the employee ID. It would be super nice if it would only import photos that are under 10KB and give a report of the ones that are to large. 

    Something  like this...

    Import-RecipientDataProperty -Identity <employeeID> -Picture -FileData ([Byte[]]$(Get-Content -path <Picture Path > -Encoding Byte -ReadCount 0))

    Yes, I know there are paid for tools out there, but I know this is possible with powershell. Any input would be greatly appreciated!

    • Spostato Awinish mercoledì 27 giugno 2012 08:58 Moved to appropriate forum (From:Directory Services)
    martedì 26 giugno 2012 20:52

Tutte le risposte