Advance

Tutorial Launch FTP with PowerShell on Windows Server 2016

Tutorial Launch FTP with PowerShell on Windows Server 2016

In this article, we want to discuss Tutorial Launch FTP with PowerShell on Windows Server 2016.

Tutorial How to Launch FTP with PowerShell on Windows Server 2016

In this tutorial, we want to build and use an FTP site with PowerShell.

How to Launch FTP with PowerShell:

1) First, open your PowerShell with Administrator access.

2) First of all, if you have not installed the FTP service on your IIS yet, install it with the following command.

Install-WindowsFeature Web-FTP-Server  

3) After installing FTP Server, enter the following command to enter the module working with IIS.

Import-Module WebAdministration  

4) After importing the desired module, create a directory with the following command.

New-Item c:\ElderFtpDir -Type Directory  

5) Then enter the following command to create an FTP site and set the server’s IP port and address on it.

New-WebFtpSite -Name "Elderftp" -Port 21 -IPAddress 192.168.1.101 -Force  

Be sure to enter your server’s IP address instead of the IP entered and your FTP name instead of Elderftp.

6) Then enter the following command to link your FTP site to the directory that was created in the fourth step.

cmd /c \windows\system32\inetsrv\appcmd set site "Elderftp" "-virtualdirectorydefaults.physicalpath:c:\ElderFtpDir"  
Recommended Article: How to change the php version in Cpanel

7) In the following configuration of FTP site with PowerShell, enter the following command to set Authentication of your site.

Set-ItemProperty IIS:\Sites\Elderftp -Name ftpServer.security.authentication.basicAuthentication.enabled -Value $true  

8) After creating the FTP site and linking it to the relevant directory, enter the following commands to set the SSL.

Set-ItemProperty IIS:\Sites\Elderftp -Name ftpServer.security.ssl.controlChannelPolicy -Value 0  Set-ItemProperty IIS:\Sites\Elderftp -Name ftpServer.security.ssl.dataChannelPolicy -Value 0  

9) Then enter the following command to set the Authorization settings of your FTP site.

Add-WebConfiguration -Filter /system.ftpserver/security/authorization -Value (@{AccessType="Allow"; Users="Administrator"; Permissions="Read,Write"}) -PSPath IIS: -Location Elderftp  

10) Restart your FTP site at the end and use it after restarting.

Restart-WebItem "iis:\sites\Elderftp"  

We hope you enjoy this tutorial Launch FTP with PowerShell on Windows Server 2016.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave Your Comment

Your email address will not be published.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+18054214518

7 days a week, 24 hours a day