Is there a way to automate setting up FTP site in IIS on Windows Server? I can manually do that following this document. But I want to do it using a script.
I'm using IIS 10 on Azure VM running Windows Server 2016.
Is there a way to automate setting up FTP site in IIS on Windows Server? I can manually do that following this document. But I want to do it using a script.
I'm using IIS 10 on Azure VM running Windows Server 2016.
To Set up FTP external Firewall IP address and data channel port range, you could apply this script:
#Set up data channel
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.ftpServer/firewallSupport" -name "lowDataChannelPort" -value 5000
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.ftpServer/firewallSupport" -name "highDataChannelPort" -value 6000
#Set external firewall support
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.applicationHost/sites/siteDefaults/ftpServer/firewallSupport" -name "externalIp4Address" -value "1.1.1.1"
There are tons of link about how to build up FTP site with powershell. https://gallery.technet.microsoft.com/scriptcenter/Creating-FTP-in-IIS-and-014b8940
You could combine these scripts base on your requirement.