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

script to RDP multiple servers

$
0
0

Hi,

Please help me in my below query...

First Question

              I needs to check if i can RDP to multiple(34) windows servers.

               I am using the below script to find out if RDP is open on multiple servers by giving servers in txt file

               $Servers = get-content C:\serverlist1.txt

               foreach($server in $servers)
       {
                New-Object System.Net.Sockets.TCPClient -ArgumentList "$server",3389
       }

           I get below result

        Client              : System.Net.Sockets.Socket
        Available           : 0
        Connected           : True
        ExclusiveAddressUse : False
        ReceiveBufferSize   : 8192
        SendBufferSize      : 8192
        ReceiveTimeout      : 0
        SendTimeout         : 0
        LingerState         : System.Net.Sockets.LingerOption
        NoDelay             : False

on the third line of result there is TRUE value

Does this mean the server is up and running ? if not please suggest which is best way.

Second Question.

is there a way to check if profiles are loading on windows server using powershell script ?

Thanks in advance

Alex

      


Alex


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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