How to identify SFTP and TFTP in our server?

Fahrid F 196 Reputation points
2020-10-13T10:52:58.197+00:00

Hi All,

I wanted to know how to check the status of the TFTP and SFTP?

I have used server manager add roles and features to verify TFTP client status and for SFTP using FTP server status.

is there any other way to check those status using PowerShell command ?

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,425 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,523 questions
Windows Server Management
Windows Server Management
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Management: The act or process of organizing, handling, directing or controlling something.
424 questions
{count} votes

Accepted answer
  1. MotoX80 32,566 Reputation points
    2020-10-13T15:57:26.597+00:00

    I think that it all depends on the problem that you are trying solve. Do you wish to monitor one server and verify that the services are started, or do you have a list of servers and you wish to determine which ones have TFTP and SFTP running.

    Microsoft has deprecated TFTP in current versions of Windows, and I'm surprised that anyone even used it.

    Again, it all depends on what you are trying to accomplish and the software that you have installed. You can test by port, process name or service name.

    I don't know what name TFTP uses for service and process. You will need to look at a machine where you have it installed.

    Get-Service | Where-Object -Property Name -match "tftp"
    Get-Service | Where-Object -Property Name -match "ssh"
    
    Get-Process | Where-Object -Property Name -match "tftp"
    Get-Process | Where-Object -Property Name -match "ssh"
    

    SFTP uses port 22.

    Test-NetConnection -Port 22
    

    An internet search says that TFTP uses UDP port 69. I have no way to test this but you could try this.

    Get-NetUDPEndpoint -LocalPort 69
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Leon Laude 85,716 Reputation points
    2020-10-13T10:58:18.347+00:00

    Hi @Fahrid F ,

    You could simply check whether the FTP role is installed on the Windows Server or not, for example with the following PowerShell command:

    (Get-WindowsFeature -Name Web-Ftp-Server).Installed  
    

    And if the FTP role is indeed installed, then you can simply query the service to see if it's running or not.

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    1 person found this answer helpful.