I'm trying to setup a workflow that pulls a list of servers out of AD (targetted via a particular OU branch) and feeds that list of servers into GetTerminalUserSessions, which will then email me a table or similar with the results of every server and who's logged into it.
I can get the list of servers out of AD into text/csv (I'm using the Quest AD commandlets)
I can get the terminal sessions of an individual server by typing the name straight into GetTerminalUserSessions
But for the life of me I cant get the TerminalSessions... to look at the list and query each server in turn
My use case...we have both admins and servers spread across the country, but have the slightly annoying inconvenience of admins leaving sessions logged onto servers for extended periods of time, and we constantly have other admins trying to login but can't because of to many sessions already. We dont want to kill connections, but are hoping to email people with a list of their current connections as a reminder...