powershell - 处理ForeignSecurityPrincipal

标签 powershell active-directory

DomainADomainB相互信任。一些DomainB用户是DomainA本地域组的成员。如何在PowerShell中获取ForeignSecurityPrincipal并获取其组列表?

最佳答案

这非常简单:

    Get-ADObject -Filter {ObjectClass -eq "foreignSecurityPrincipal"} -Properties msds-principalname,memberof    

其中“msds-principalname”是sAMAccountName,因此我现在可以通过sAMAccountName在FSP中进行搜索并获取其组。

关于powershell - 处理ForeignSecurityPrincipal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30775252/

相关文章:

powershell - 通过 Invoke-Command : "... not recognized as the name..." 调用远程 cmdlet (ffmpeg)

node.js - 如何通过 "dn"的 block 找到 Node AD 中的用户?

c# - 将用户分配给组,Azure AD Graph Api

asp.net - 使用 Azure AD 和 WebAPI 进行服务到服务身份验证

c# - 从 C# 执行脚本时如何处理 PowerShell 无法找到导入 (AzureAd)

powershell - 将批处理脚本转换为Powershell脚本

c# - 从 c# 在 64 位服务器上运行 32 位 powershell

PowerShell:如何在循环中更改表头?

java - 如何根据 LDAP 中的证书搜索用户?

active-directory - LDAP 嵌套组成员资格过滤器