Firewall setup for Windows Server acting as FTP client

On Windows Server (2012 and 2012R2), in order to retrieve files using ftp get the program ftp.exe needs to have access to ports 20, 21, and 1024-65535, therefore, a new firewall rule has to be created. In this situation, the Windows server is an FTP client and the firewall rule can only apply to the FTP program, but not the service (ftpsvc).

New-NetFirewallRule -DisplayName "FTP In" -Direction Inbound -Protocol TCP –Enabled True –Action Allow -Profile Any -Program "%SystemRoot%\System32\ftp.exe" -Service Any -LocalPort 20,21,1024-65535 -EdgeTraversalPolicy Allow

The instructions covered by Microsoft in How to Configure Windows Firewall for a Passive Mode FTP Server are not useful in your case. They apply when you're running an FTP server, but you're using the FTP client on your Windows Server.