Hi @Rich Ellis ,
maybe this is an option: https://www.powershellcenter.com/2021/07/04/powershell-module-to-get-rdp-session-info/
After installing the module the script could look like this (not tested by myself):
$serverlist = "Server1", "Server2", "Server3"
$serverlist | ForEach-Object {
Write-Host "Proceeding $_"
Get-PSCActiveSession -Name "$_" | Export-Csv c:\junk\RDPsessions.csv -NoTypeInformation
}
Getting the content of your CSV file depends on the format.
One option could be Import-CSV
: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.2
Or Get-Content
: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-content?view=powershell-7.2
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten