简体   繁体   English

IIS WebDeploy 导出服务器 Package 通过 Powershell

[英]IIS WebDeploy Export Server Package via Powershell

I am curious how to create an "export server package" via powershell commands to IIS manager.我很好奇如何通过 powershell 命令向 IIS 管理器创建“导出服务器包”。

Here is my scenario: When I deploy our .NET software builds (and Flex, etc) to our web server, I normally do this process manually: I open up IIS Manager and follow the "Export Server Package" wizard (which creates a zip file of the entire IIS structure - contents and all).这是我的场景:当我将我们的 .NET 软件构建(和 Flex 等)部署到我们的 web 服务器时,我通常手动执行此过程:我打开 IIS 管理器并按照“导出服务器包”向导(它创建一个 zip 文件整个 IIS 结构 - 内容和所有)。 Then I archive this new zip file that was produced (for backup purposes).然后我将生成的这个新的 zip 文件存档(用于备份目的)。 The zip file is helpful if our web server becomes unresponsive or disappears in "the cloud".如果我们的 web 服务器变得无响应或在“云”中消失,则 zip 文件会有所帮助。 A IIS backup zip file allows us to "roll out" quickly. IIS 备份 zip 文件可以让我们快速“推出”。

My question is... how can I accomplish exporting of a server package with Powershell scripts (instead of manually)?我的问题是...如何使用 Powershell 脚本(而不是手动)完成服务器 package 的导出? I cannot find much on this topic on the web!!我在网上找不到太多关于这个主题的信息!!

I have looked at the MS Deploy verbs (as covered here: http://raquila.com/software/ms-deploy-basics/ ) but I do not see one for an "Export" verb/action??我查看了 MS Deploy 动词(如此处所述: http://raquila.com/software/ms-deploy-basics/ )但我没有看到“导出”动词/动作?

Any help is appreciated.任何帮助表示赞赏。 My ultimate goal is to produce the server package via powershell, and upload to Amazon S3 cloud for safe keeping.我的最终目标是通过 powershell 生成服务器 package,并上传到 Amazon S3 云安全保存。 The S3 cloud stuff is easy, it's the powershell to IIS script I am having problems with... S3 云的东西很简单,它是 powershell 到 IIS 脚本我遇到了问题......

I can't see a great way of doing this with just PowerShell cmdlets.我看不到仅使用 PowerShell cmdlet 即可执行此操作的好方法。 What I would suggest is using PowerShell to call appcmd to export the application settings and then grab a copy of the files used.我建议使用 PowerShell 调用 appcmd 导出应用程序设置,然后获取所用文件的副本。 Then I'd throw these in an S3 bucket, also through PowerShell.然后我会把它们扔到 S3 桶中,也通过 PowerShell。

Are you using anything to build the artifacts (ie: bamboo or teamcity?) If straight from VisualStudio use the AWS ToolKit: http://aws.amazon.com/visualstudio/您是否使用任何东西来构建工件(即:bamboo 或 teamcity?)如果直接从 VisualStudio 使用 AWS 工具包: http://aws.amazon.com/visualstudio/

For deploys: I would focus on getting the artifacts pushed to S3 in some automated fashion (if at all possible).对于部署:我将专注于以某种自动化方式(如果可能的话)将工件推送到 S3。 Once you get the artifacts in S3, work on your plan to use those artifacts again.获得 S3 中的构件后,制定再次使用这些构件的计划。 Are they for bootstrapping new instances/servers from S3?它们用于从 S3 引导新实例/服务器吗? Are they backups for DR purposes?它们是用于 DR 目的的备份吗?

For example, we build using Bamboo and within Bamboo we can create a deployment plan with Tasks to execute.例如,我们使用 Bamboo 进行构建,在 Bamboo 中我们可以创建一个包含要执行的任务的部署计划。 One of these includes uploading to S3.其中之一包括上传到 S3。

**Checkout the following powershell cmdlets: http://www.iis.net/learn/publish/using-web-deploy/web-deploy-powershell-cmdlets **检查以下 powershell cmdlet: http://www.iis.net/learn/publish/using-web-deploy/web-deploy-powershell-cmdlets

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM