Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to display ComputerName in output?

$
0
0

Hello,

Im running the following and I pass a list of Domain Controllers to a Get-WmiObject.  In my output, I want to display the name of the DC along with the Name variable from the Get-Wmiobject.  How can I do this?

get-addomaincontroller -filter 'Name -like "acme*"' | sort name | select name | foreach {get-wmiobject win32_computersystemproduct | FT ComputerName, Name} 


Thanks for your help! SdeDot


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>