<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: This script shows all servers with any RDC sessions open.  i need it to just show me a specific username that is logged into any of the listed servers.  Could someone help me? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154023#M31302</link>
    <description>&lt;P&gt;You'll probably get a better response at a Powershell-specific forum like &lt;A href="http://powershell.com/cs/"&gt;powershell.com&lt;/A&gt; or &lt;A href="http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell"&gt;Microsoft Technet&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jul 2014 14:09:29 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2014-07-23T14:09:29Z</dc:date>
    <item>
      <title>This script shows all servers with any RDC sessions open.  i need it to just show me a specific username that is logged into any of the listed servers.  Could someone help me?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154022#M31301</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;$servers = get-content “C:\scripts\servers.txt”

foreach ($server in $servers)

{

$server

$command = “quser /server:” + $server

invoke-expression $command

}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jul 2014 13:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154022#M31301</guid>
      <dc:creator>chadkfranks</dc:creator>
      <dc:date>2014-07-23T13:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: This script shows all servers with any RDC sessions open.  i need it to just show me a specific username that is logged into any of the listed servers.  Could someone help me?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154023#M31302</link>
      <description>&lt;P&gt;You'll probably get a better response at a Powershell-specific forum like &lt;A href="http://powershell.com/cs/"&gt;powershell.com&lt;/A&gt; or &lt;A href="http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=winserverpowershell"&gt;Microsoft Technet&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 14:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154023#M31302</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-07-23T14:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: This script shows all servers with any RDC sessions open.  i need it to just show me a specific username that is logged into any of the listed servers.  Could someone help me?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154024#M31303</link>
      <description>&lt;P&gt;Agreed with Rich, since this is very specific to PowerShell, not Splunk. But I'll give you a hint real quick. You need to look at two areas: filtering, and working with objects generally. You can use a variety of methods to filter input. One is the &lt;A href="http://technet.microsoft.com/en-us/library/hh849715.aspx"&gt;Where-Object cmdlet&lt;/A&gt;. But when working with PowerShell, it's best to convert text strings into objects, as it's much easier to work with them that way. &lt;A href="http://gallery.technet.microsoft.com/scriptcenter/PowerShell-script-to-Find-d2ba4252"&gt;This script&lt;/A&gt; that I found real quick (I googled for "powershell query rdc") shows a technique to use the qwinsta.exe command, but then converting the output to CSV, and then using the ConvertFrom-CSV to turn it into objects. &lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jul 2014 18:59:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/This-script-shows-all-servers-with-any-RDC-sessions-open-i-need/m-p/154024#M31303</guid>
      <dc:creator>halr9000</dc:creator>
      <dc:date>2014-07-23T18:59:14Z</dc:date>
    </item>
  </channel>
</rss>

