Help with Automation – Searching AD for user, then Searching Files with that username, then uploading them to Exchange

Hey All, I am still learning Powershell I would love someone to put in the right direction on how to tackle this.

Challenge: Find all staff that do not have photos in Exchange, find the photos which are stored with slightly different file names, copy the files to location then upload to exchange.

My shitty Script:

I added -first 1 to do a one a time but I would love to learn if file does not exist skip user then go onto next but I know I have to do something completely different in my script.

*EDIT Lovely /u/ta11ow/ helped me with this what a legend *

submitted by /u/detenshi12
[link] [comments]

Leave a Reply