Active Directory DirectorySearcher를 사용하여 Windows 10을 실행하는 모든 컴퓨터를 찾는 방법은 무엇입니까?

Active Directory DirectorySearcher를 사용하여 Windows 10을 실행하는 모든 컴퓨터를 찾는 방법은 무엇입니까?

System.DirectoryServices.DirectorySearcher도메인 내에서 Windows 10을 실행하는 모든 컴퓨터를 찾는 필터를 설정하려고 합니다 . 두 가지 기준을 결합하는 필터의 구문은 무엇입니까? 나는 시도했다

$Searcher   = New-Object System.DirectoryServices.DirectorySearcher([ADSI]$LDAPProviderPath)
$SearchRoot = New-Object System.DirectoryServices.DirectoryEntry($LDAPProviderPath, "...", "...")

$Searcher.SearchRoot = $SearchRoot

$Searcher.filter="(&(objectCategory=computer)(OperatingSystem=Windows 10))"

필터를 올바르게 설정하는 방법은 무엇입니까?

답변1

노력하다

"(&(objectCategory=computer) (operatingSystem=*Windows 10*))"

LDAP 필터로.

관련 정보