PowerShell的:获取计算机帐户会员信息(而不是用户帐户) [英] PowerShell: Get membership info for a computer account (not a user account)

查看:277
本文介绍了PowerShell的:获取计算机帐户会员信息(而不是用户帐户)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

获得一个身份暧昧的错误。我可以搜索成功地返回到用户帐户是其成员的组,但是当我试图寻找一个计算机帐户是一个成员有暧昧身份错误的群体。我试图用型或-identity开关,但无论是我没有正确的语法,或者只是不适用的。

Getting an ambiguous identity error. I can search successfully to return the group that a user account is a member of, but when I try to search for the groups that a computer account is a member of there is the ambiguous identity error. I tried to use a -type or -identity switch, but either I did not have the syntax correct or it was just not applicable.

在哪里我的目标计算机帐户被称为SNA00760856,我一直在使用...

Where my targeted computer account is called SNA00760856, I have been working on using...

Get-QADGroup -Containsindirectmember SNA00760856

这是我能做到的命令,任何按摩来获取计算机SNA00760856是其成员的群体?在删除用户帐户代替计算机帐户就像一个魅力。

Any massaging that I can do to the command to get the groups that the computer SNA00760856 is a member of? Dropping in a user account in place of the computer account works like a charm.

我也试图进入决赛域信息的计算机名称。
即SNA00760856.mydivision.mydomain.com或mydivision \ SNA00760856

I have also tried to qualify the computer name with the domain info.
Ie SNA00760856.mydivision.mydomain.com or mydivision\SNA00760856

也尝试过使用我知道是的开关信息仔细阅读....

Also tried to collect the membership of the computer using which I know is wrong after a closer reading of the switch info....

Get-QADobject -IndirectMemberOf SNA00760856

结果的暧昧身份为好。

Results in ambiguous identity as well.

推荐答案

如果你想清理输出,使用

If you want to clean up the output, use this

Get-ADPrincipalGroupMembership (Get-ADComputer ComputerName) | select-object name

这篇关于PowerShell的:获取计算机帐户会员信息(而不是用户帐户)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆