iisutil 1.0.2

dotnet add package iisutil --version 1.0.2                
NuGet\Install-Package iisutil -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="iisutil" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add iisutil --version 1.0.2                
#r "nuget: iisutil, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install iisutil as a Cake Addin
#addin nuget:?package=iisutil&version=1.0.2

// Install iisutil as a Cake Tool
#tool nuget:?package=iisutil&version=1.0.2                

IIS网站发布工具套件
基本形式形式:
IISExecutor.Execute(args)
进程返回值即为运行结果,0表示成功,其它值为出错,具体见后文错误码
===========================================

1、创建站点
参数:
 CreateSite
 /siteName:站点名,必填
 /httpPort:端口,在IIS6下必填,IIS7非必填
 /httpsPort:ssl端口,非必填
 /physicalPath:物理路径,必填
 /sslHash:证书hash,指定了httpsPort时必填,证书要放入LocalMachine的个人区


----------------------
2、删除站点
参数:
 RemoveSite
 /siteName:站点名,必填


----------------------
3、创建应用程序池
参数:
 CreateAppPool
 /poolName:池名,必填


----------------------
4、删除应用程序池
参数:
 RemoveAppPool
 /poolName:池名,必填


----------------------
5、创建虚拟目录
参数:
 CreateDir
 /siteName:站点名,必填
 /virtualPath:虚拟路径,以/开头,目前只支持一级,必填
 /physicalPath:物理路径,必填
 /enableAllMimeTypes: 是否允许下载任意文件,非必填


----------------------
6、删除虚拟目录

参数:
 RemoveDir
 /siteName:站点名,必填
 /virtualPath:虚拟路径,必填


----------------------
7、创建应用程序

参数:
 CreateApp
 /siteName:站点名,必填
 /virtualPath:虚拟路径,以/开头,目前只支持一级,必填
 /physicalPath:物理路径,必填
 /poolName:应用程序池名,必填
 /useSsl:是否要求ssl,非必填


----------------------
8、删除应用程序
参数:
 RemoveApp
 /siteName:站点名,必填
 /virtualPath:虚拟路径,必填


----------------------
9、判断站点是否存在
参数:
 SiteExist
 /siteName:站点名,必填
返回值:
 400  不存在
 503  存在


----------------------
10、更换站点ssl证书

参数:
 SetCert
 /siteName:站点名,必填
 /sslHash:证书hash,必填,证书要放入LocalMachine的个人区


----------------------
11、更换站点端口

参数:
 SetPort
 /siteName:站点名,必填
 /httpPort:端口
 /httpsPort:ssl端口


===========================================


错误码:

302: 参数错误
400: 站点未找到
401: 应用程序池未找到
402: 应用程序未找到
403: 根应用未找到
404: 虚拟目录未找到
500: IIS版本未知
501: http端口已占用
502: https端口已占用
503: 站点已存在
504: 应用程序池已存在
505: 应用程序已存在
506: 虚拟目录已存在
909: 未知错误

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 446 8/31/2022
1.0.1 392 8/31/2022
1.0.0 402 8/31/2022