Sto*_*nov 5 powershell active-directory
有没有办法在PrincipalsAllowedToRetrieveManagedPasswordgMSA(组托管服务帐户)的属性中列出所有组和/或主机的当前列表?
这证明,你可以通过运行列出GMSA所有属性:
Get-ADServiceAccount -Identity <gMSA-account> -Properties *
Run Code Online (Sandbox Code Playgroud)
如果你想缩小列表的范围,你可以使用:
Get-ADServiceAccount -Identity <gMSA-account> -Properties PrincipalsAllowedToRetrieveManagedPassword
Run Code Online (Sandbox Code Playgroud)
它的可读性不是很好,因为它是一个可分辨名称列表并列出了其他几个属性,但它是一个有用的命令。
更新:要显示此属性中的所有条目,您可以使用此命令,该命令更短且更易于处理@Gregory 发布的内容
(Get-ADServiceAccount -Identity <gMSA-account> -Properties *).PrincipalsAllowedToRetrieveManagedPassword
Run Code Online (Sandbox Code Playgroud)
您可以选择特定属性,而不是通配符 *,以减少流经网络的数据,但由于属性名称冗长,该行变得非常长。
| 归档时间: |
|
| 查看次数: |
18633 次 |
| 最近记录: |