windows - 您可以仅使用命令在 Windows 上设置 FTP 服务器吗?
问题描述
我需要自动构建 Windows10-VM(使用 packer/ansible),包括一个工作的 FTP 站点。第一步 - 启用必要的 Windows 功能 - 可以通过使用 ansible 的win_feature
-module 来完成,看起来像这样(编辑:第一个解决方案仅对 Windows Server 有效。添加了第二个解决方案):
- name: Enable windows features required for setting up ftp
win_feature:
name: FTP Server
state: present
include_sub_features: true
include_management_tools: true
- name: Enable windows features required for setting up ftp
win_shell: Enable-WindowsOptionalFeature -Online -FeatureName "IIS-FTPServer","IIS-FTPSvc" -all
至少对我来说,困难的部分实际上是设置 FTP 站点。由于它必须通过 ansible 实现自动化,因此我不能像往常一样使用 GUI(IIS 管理控制台)。有没有办法只使用命令来完成这个?
解决方案
推荐阅读
- r - case_when 使用公式
- javascript - 如何将评估返回的变量传递给 Nightmare.js 中的另一个评估
- spring-boot - 使用 Spring 中的 JpaRepository 从 Kotlin(Springboot)中的表中删除一行的正确方法是什么?
- html - Bootstrap:列元素在其他列上溢出
- reactjs - React - < Input> 值未在 onChange 事件上更新
- android - 在构造函数中创建具有 Android 上下文作为参数的单例类
- vb.net - System.Net.WebException:“远程服务器返回错误:(463)。”
- css - 重新创建/复制 Twitter 的 @username 信息模态框
- security - 隐藏threejs软件后端工作的自定义格式
- opencv - 如何为 DataGenerator keras 使用自定义图像加载器?