a guest Jul 12th, 2018 79 Never
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
RAW Paste Data