如何使用PowerShell在Active Directory的子OU中获取所有计算机?

时间:2019-01-18 22:54:17

标签: powershell active-directory

我想去:

Remote Sites
    MyCity
        Computers

并获取所有计算机的列表。

这是我到目前为止所拥有的:

Get-ADComputer -Filter * -SearchBase "OU=MyCity,DC=MyDomain,DC=com" |
    Select -Property Name, DNSHostName, Enable, LastLogonDate

0 个答案:

没有答案