简体   繁体   English

使用PowerShell获取所有活动域计算机

[英]Using PowerShell to get all active-domain computers

I'm using this script(below) to get all computers on the domain; 我正在使用下面的脚本来获取域中的所有计算机; but it seems like it stops at 1000 on the dot, when I know there is clearly more. 但是当我知道明显更多时,它似乎停在1000点上。 How would I go about getting the complete list? 我将如何获取完整列表?

$strCategory = "computer"

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.Filter = ("(objectCategory=$strCategory)")

$colProplist = "name"
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}

$colResults = $objSearcher.FindAll()

foreach ($objResult in $colResults)
{$objComputer = $objResult.Properties; $objComputer.name >> allcomps.csv}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Powershell invoke-expression在所有域计算机上卸载Java - Using Powershell invoke-expression to uninstall Java on all domain computers 使用Powershell获取与现有Active Directory计算机相关的可用主机名 - Get available Hostnames related to existing Active Directory Computers using Powershell 通过所有 AD 计算机对象使用 Powershell Get-ItemProperty - Using Powershell Get-ItemProperty through all of AD computers object 如何使用Powershell查找所在计算机列表是否是域? - How to find if a list of computers on are a domain using Powershell? 如何在PowerShell中将所有Active Directory计算机读入阵列? - How can I read all Active Directory computers into an array in PowerShell? 如何使用Powershell从Active Directory上的计算机获取磁盘信息 - How to get disk information from computers on Active Directory with Powershell 对Active Directory中的所有计算机运行Powershell脚本 - Running a powershell script against all the computers in Active Directory PowerShell获取计算机名称和.Net Framework for Domain计算机? - PowerShell to get Computer name and .Net Framework for Domain computers? Powershell脚本可在域中的所有计算机上运行-等待计算机联机 - Powershell script to run on all computers in domain - wait until computer is online 使用 PowerShell 列出 OU 中所有计算机的信息 - Listing information for all computers in an OU using PowerShell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM