photo import
-
martedì 26 giugno 2012 20:52
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 AwinishMVP mercoledì 27 giugno 2012 08:58 Moved to appropriate forum (From:Directory Services)
Tutte le risposte
-
martedì 26 giugno 2012 21:03
Hello,
you may better ask this in the Windows Powershell forum http://social.technet.microsoft.com/Forums/en/winserverpowershell/threads
See also the end from the article http://blogs.technet.com/b/exchange/archive/2010/06/01/3410006.aspx
Best regards
Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP - Directory Services
My Blog: http://msmvps.com/blogs/mweber/Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
- Proposto come risposta VenkatSP martedì 26 giugno 2012 22:36
-
mercoledì 27 giugno 2012 08:52Moderatore
Hi,
I suggest we try to refer to the thread below, it may be helpful.
How to import Photos into Active Directory
Regarding PowerShell issue, I suggest we try to ask in the PowerShell forum for help.
Windows PowerShell
http://social.technet.microsoft.com/Forums/is/winserverpowershell/threads
Regards,
Andy

