【问题标题】:Getting authentication delegation settings for an AD account from a non Domain controller with Powershell使用 Powershell 从非域控制器获取 AD 帐户的身份验证委托设置
【发布时间】:2021-09-30 16:16:59
【问题描述】:

我在连接到 AD 的计算机上拥有管理员权限。但我没有域控制器的权限。

使用 PowerShell 是否可以从我的管理员计算机获取 AD 帐户的所有身份验证委托设置?如果可能怎么做?

我所说的委派设置是 AD 帐户的委派选项卡,用于 Kerberos 身份验证。以下是我所指内容的快照。目前我可以看到该帐户可以向其提供委托凭据的服务很少,但不是全部,因为我无法向下滚动列表,因为它是灰色的。

【问题讨论】:

  • 您是否安装了适用于 Windows PowerShell 的 Active Directory 模块?
  • @T-Heron :是的,我的 PS 会话中导入了 ActiveDirectory 模块。

标签: powershell active-directory kerberos-delegation


【解决方案1】:
Get-ADObject -Filter {name -eq "yoursamaccountname"} -Properties msDS-AllowedToDelegateTo

【讨论】:

  • 我收到警告:PS F:\Documents> Import-Module ActiveDirectory 警告:初始化默认驱动器时出错:'无法联系服务器。这可能是因为此服务器不存在、当前已关闭或没有运行 Active Directory Web 服务。'。
【解决方案2】:
Get-ADUser -Filter {SamAccountName -eq "YourAccountSamName"} -Properties msDS-AllowedToDelegateTo | Select-Object -ExpandProperty msDS-AllowedToDelegateTo

它将列出该帐户可以向其提供委托凭据的所有服务

【讨论】:

    【解决方案3】:

    不幸的是,Neroon 的答案对我不起作用,但我为 AD 用户提出了一个解决方案,以防其他人正在寻找它:

    Get-ADUser -filter { SamAccountName -eq "YouAccountSamName" } -Properties TrustedForDelegation | Select SamAccountName, TrustedForDelegation | FT -A
    

    对于多个用户:

    $users = @('user1', 'user2')
    $users | ForEach {Get-ADUser -filter { SamAccountName -eq $_ } -Properties TrustedForDelegation} | Select SamAccountName, TrustedForDelegation | sort -property SamAccountName | FT -A
    

    【讨论】:

      猜你喜欢
      • 2020-04-15
      • 1970-01-01
      • 2021-03-19
      • 1970-01-01
      • 1970-01-01
      • 2020-07-14
      • 2017-03-12
      • 2016-10-06
      • 1970-01-01
      相关资源
      最近更新 更多