Chad,
Welcome to the forum. ![]()
The most common way of combining the results of more than one query is to use a [PSCustomObject].
$InputComputerList = Get-Content -Path 'C:\Data\GetDescription\ComputerList.txt'
$Result =
foreach ($ComputerName in $InputComputerList) {
$ADComputer = Get-ADComputer -Identity $ComputerName -Properties Description
[PSCustomObject]@{
Name = $ADComputer.Name
Description = $ADComputer.Description
Online = Test-Connection -ComputerName $ComputerName -Count 1 -Quiet
}
}
$Result
Of course you can pipe the $Result to whatever further step you want. ![]()