Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Check if AD users have a thumbnailPhoto

$
0
0

This what I thought was working until I checked in outlook.

Import-Module ActiveDirectory $AllUsers = get-aduser -filter { objectClass -eq "User" -and Enabled -eq "True"} -Properties SamAccountName | select SamAccountName $WithPhotos = get-aduser -filter { objectClass -eq "User" -and Enabled -eq "True" -and thumbnailPhoto -ne "NULL" } -Properties SamAccountName | select SamAccountName $WithoutPhotos = Compare-Object -ReferenceObject $WithPhotos -DifferenceObject $AllUsers -PassThru 

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

The post Check if AD users have a thumbnailPhoto appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images