Share via

获取AD中所有DC的信息,如计算机名,IP地址设置,站点信息

Anonymous
2023-10-31T02:49:46+00:00

工程师您好

有没有一个命令或者脚本的方式,可以获取到一个林或者域控所有的DC的信息,包含计算机名称,站点名称,IP地址,甚至创建的时间,

Windows for business | Windows Server | Directory services | Active Directory

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2023-10-31T06:53:24+00:00

尊敬的客户,您好!

感谢您在Microsoft Community论坛发帖。

第一个命令可以得到域里所有域控的名字,站点和IP地址。
Get-ADDomainController -Filter * | ft name, hostname, site, ipv4address

第二个命令可以得到域里所有域控的创建时间。
(Get-ADDomainController).ComputerObjectDN|foreach-object{get-adcomputer $_ -Properties whencreated}

如果有任何疑问欢迎您随时咨询我们。

Best Regards,
Daisy Zhou

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-11-01T07:14:34+00:00

    尊敬的客户,您好!

    您试试这个命令:

    (Get-ADDomainController -Filter *).ComputerObjectDN|foreach-object{get-adcomputer $_ -Properties whencreated}

    Image

    Best Regards,
    Daisy Zhou

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-10-31T08:14:27+00:00

    您好 ,这样只得到了一台域控的信息。

    因为我AD中有多个DC,如何得到多个DC的信息。

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2023-10-31T07:49:10+00:00

    尊敬的客户,您好!

    复制黏贴就可以啦。

    看我的测试:

    Best Regards,
    Daisy Zhou

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-10-31T07:34:11+00:00

    您好,非常感谢您的回复,

    第一个命令我试了比较成功,

    第二个命令没有执行成功,您方便再核对一下不

    Was this answer helpful?

    0 comments No comments