![](/img/trans.png)
[英]Get AD Groups with ASP.NET WebAPI C# not working on Windows Server 2016 Datacenter
我有一個 ASP.NET Web API 應用程序,它將所有包含來自 Active Directory 的特定名稱的組加載到內部數據庫中。 這是在 Dev 上工作的。 PC (Windows 10)、Testserver 和舊的 Productive Server (Windows Server ...
[英]Get AD Groups with ASP.NET WebAPI C# not working on Windows Server 2016 Datacenter
我有一個 ASP.NET Web API 應用程序,它將所有包含來自 Active Directory 的特定名稱的組加載到內部數據庫中。 這是在 Dev 上工作的。 PC (Windows 10)、Testserver 和舊的 Productive Server (Windows Server ...
[英]How can I find computers with LastLogonTimestamp less than a certain date OR null
以下代碼返回所有登錄日期早於3個月之前但未獲取lastlogontimestamp為null的計算機原理的計算機 我如何還可以優雅地將具有空值“ lastlogontimestamp”值的計算機添加到“計算機”中? ...
[英]PrincipalSearcher Wrong Username Or Password error
我正在嘗試從活動目錄中獲取用戶數據。 身份驗證過程是正確的。 但是PrincipalSearcher返回了錯誤的用戶名或密碼。 我怎么解決這個問題? ...
[英]DirectorySearcher doesn't respect the SizeLimit property if the SizeLimit is 256 or over
我正在使用PrincipalSearcher和DirectorySearcher篩選用戶並指定要抓取的屬性。 在2個不同的網絡上進行測試。 一個網絡有8K +記錄,另一個網絡有135K +。 在135K +網絡上,它無法將記錄保存到數據庫。 因此,我想對少量記錄進行測試,但是對於我嘗試過 ...
[英]Complex Search Filtering with PrincipalSearcher
我正在使用PrincipalSearcher對象在 Active Directory 中搜索特定的SamAccountName值,因為我想返回UserPrincipal的。 我想知道如何將兩個過濾器應用於該搜索; 一個是帳戶名稱的開頭以 xx 開頭,另一個是它不以 _c 結尾。 目前,我可以使用x ...
[英]Get Count of members in a AD Group using PrincipalSearcher
Env:Visual Studio 2013,FrameWork 4.5,Telerik控件,C#,WebForm應用程序 使用:System.DirectoryServices和System.DirectoryServices.AccountManagement 我正在使用搜索工具 ...
[英]How would i assign only DisplayName and Name from PrincipalSearcher to List?
我有以下示例代碼: 我如何只將result.DisaplayName和result.Name分配給結果列表? 您可以將PrincipalSearcher配置為僅拉回這兩個值以 就像您可以使用PowerShell那樣,即: 謝謝 ...
[英]AD PrincipalSearcher: Search where property does not contain some value
在構建過濾器以查找具有特定值的對象時,Principal Searcher似乎做得很好。 沒有呢? 例如,如何構建過濾器以排除名稱中包含“Joe”的所有人。 下面的代碼不起作用。 .... ...
[英]How can i get all groups of a local user using ObjectQuery?
我嘗試顯示一個特殊用戶所在的所有組。我也知道,我可以這樣做: 但是我想在PrincipalContext周圍工作,因為我需要在PC上遠程使用它,而該域中沒有。 所以我嘗試了這個: 它給了我一個異常,因為查詢不正確。 非常感謝您的任何幫助。 ...
[英]Extend UserPrincipal class
我做了UserPrincipal類的擴展,以檢索我需要的一些缺少的屬性: 然后,我可以像這樣輕松搜索: 因此,我的新任務和我當前的問題是:對於ActiveDirectory中搜索到的組,當然需要使用擴展類來獲取用戶列表。 我怎樣才能實現目標? 作為解決方法,我已經創 ...
[英]How to include multiple OU from AD account in a single search using PrincipleSearcher in asp.net c#
方案: Active Directory用戶名搜索應針對搜索項(例如,名字或姓氏)返回結果。 有6個國家/地區被設置為廣告客戶的不同組織單位。 例如英國(OU =英國),法國(OU = FR)。 現在,應該為用戶顯示一個用戶名,該用戶名可能屬於OU = UK或OU = FR。 我正在 ...
[英]Active Directory - weird behaviour
我正在嘗試獲取信息(團體成員)。 每當出現“無法檢索有關域的信息(1355)”消息時,我都會收到 為了獲得小組,它僅嘗試了2次。 第一次沒用,但是第二次給我帶來了小組。 但是,為了吸引小組成員,我沒有工作要做。 有人知道我在做什么錯嗎? 問候 ...
[英]Search Users in Active Directory based on First Name, Last Name and Display Name
我試圖在我的組織Active Directory中搜索用戶。 如果FirstName 或 LastName 或 DisplayName匹配特定的字符串值,則應返回用戶。 我的代碼: 問題是我只能通過一個過濾器進行搜索。 我能夠與過濾器進行AND操作,但無法進行OR操作。 ...
[英]Query PrincipalSearcher for containing multiple strings
我希望能夠查詢活動目錄並給出包含某些單詞(如“用戶”或“管理員”)的所有組的列表,這是我到目前為止所掌握的 該代碼甚至似乎都沒有過濾掉不是管理員或用戶的組名稱。 但是無論如何,我不知道如何查詢組名是否包含? 如果組名等於以及如何對多個字符串執行此操作,則不可以。 我可以使用Di ...
[英]Does PrincipalSearchResult<T> automatically dispose all elements in its collection?
在MSDN文檔中找不到任何關於此的內容。 也就是這樣做,說: 這是我見過的大多數例子,或者我應該這樣做: 后者(在迭代期間明確地處理每個項目)看起來“更安全” - 即符合指南以明確處理所有IDisposable對象 - 但它有點凌亂; 例如,它排除了使用LINQ迭代搜索結 ...