Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user = 'FIRST_LAST'
- $username = 'USER'
- $photoName = Get-ChildItem -Path \\PATH -Recurse -Include $user*_bw_crop.jpg -File | Select-Object -ExpandProperty Name
- $photo = Get-ChildItem -Path \\PATH -Recurse -Include $user*_bw_crop.jpg -File
- $photocopy = $photo | Copy-Item -Destination "C:\temp"
- Set-UserPhoto -Identity $username -PictureData ([System.IO.File]::ReadAllBytes("C:\temp\$photoName")) -Confirm:$False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement