title: Get SCCM Collection Info from List of Servers
body: <p>I need to get SCCM collection info form a list of 150 servers to figure out what deployment collections each device belongs to. I can easily list all devices from a collection but not the other way. The below gets everything else but what collections they are members of.</p>
  <p>Get-Content &quot;C:\Temp\ServerList.txt&quot; | foreach {Get-CMDevice} | Export-Csv -Force -NoTypeInformation &quot;c:\temp\sccmcollectioninfo.csv&quot;</p>