简体   繁体   English

如何在powershell中运行iis备份可执行文件

[英]How to run iis backup executable in powershell

我试图运行以下命令并尝试传递参数和哈希表,但它不起作用:

msdeploy.exe -verb:sync -source:metakey=lm/w3svc/1 -dest:package=C:\iis_backups\site1.zip,encryptPassword=xyxyz > C:\iis_backups\site1.log

This has been answered before here: Running msdeploy.exe from within Powershell 这在此之前已得到解答: 从Powershell中运行msdeploy.exe

It appears the solution for your scenario is as follows: 您的方案的解决方案如下所示:

msdeploy.exe '-verb:sync' '-source:metakey=lm/w3svc/1' '-dest:package=C:\iis_backups\site1.zip,encryptPassword=xyxyz' > C:\iis_backups\site1.log

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用PowerShell进行IIS备份 - IIS backup using powershell 如何在Powershell中将可执行文件设置为以管理员权限运行 - How to set an executable to run with administrator rights in powershell 如何通过 Powershell 在 IIS 应用程序池中填充 Shutdown Executable 字段 - How To Populate Shutdown Executable field in IIS App Pool through Powershell 如何从Powershell运行IIS Apppool回收? - How to run IIS apppool recycle from powershell? 如何在IIS中运行PowerShell脚本? - How do I run a PowerShell script “in” IIS? 如何在没有批处理文件或cmd的情况下通过PowerShell运行可执行文件? - How to run an executable through PowerShell without batch files or cmd? 如何通过在 powershell 中提供配置文件来运行可执行文件 (exe) - How to run an executable (exe) by providing a config file in powershell 在Powershell中,如何将可执行文件运行一个小时,然后停止半个小时,然后重复执行? - In Powershell, how to run an executable for an hour, stop for half an hour, then repeat? 如何使用Powershell'invoke-expression'以不同的用户身份运行可执行文件 - How to user Powershell 'invoke-expression' to run an executable as a different user 如何使用 powershell 在 GitLab CI/CD 脚本中运行可执行文件 - How to run an executable file in GitLab CI/CD script using powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM