企业级小程序逆向分析:用unpackminiapp做竞品研究
2025/12/18 15:49:23
在活动目录中搜索特定用户时,我们可使用以下代码进行操作。以下是一个搜索已知SAMAccountName用户目录服务条目的示例:
$username = "FoxMulder" "Search user " + $username + "..." $root = new-object system.directoryservices.directoryEntry("LDAP://XFilesServer1/DC=FBI,DC=net") $Filter = "(SAMAccountName=" + $username +")" $Attribute = "CN","ObjectClass","ObjectCategory","distinguishedName","lastLogonTimestamp","description","department","displayname" # 编译搜索 $Searcher = New-Object Directoryservices.DirectorySearcher($root) $searcher.PageSize = 900 $searcher.Filter = $Filter $searcher.SearchScope = "subtree" $Attribute | foreach {[void]$searcher.PropertiesToLoad.Add($_)} # 执行搜索 $searcher.findAll()为了在活动目录中进