我正在尝试编写一个PowerShell脚本来自动执行IIS网站部署。我试图在Windows Server 2008 R2计算机上的32位以下环境中运行脚本:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
Run Code Online (Sandbox Code Playgroud)
每当我运行这样的WebAdministration命令时:
Get-Website -Name "MYWebsite"
Run Code Online (Sandbox Code Playgroud)
我收到这样的错误:
Get-Website : Retrieving the COM class factory for component with CLSID {688EEE
E5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154.
At line:1 char:12
+ Get-Website <<<< -Name "MyWebsite"
+ CategoryInfo : NotSpecified: (:) [Get-Website], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Micr
osoft.IIs.PowerShell.Provider.GetWebsiteCommand
Run Code Online (Sandbox Code Playgroud)
切换到64位版本的PowerShell.exe可以解决此问题,但使我无法同时使用Microsoft Team Foundation Server 2008 Power Tools PSSnapin,这对我来说是不行的。
知道我该如何克服吗?提前致谢。
我按照以下步骤安装了 openlitespeed:
wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.shbash ols1clk.sh -w在此之后,我尝试登录到http://myip:7080/login.php. 我尝试过admin,123456但失败了。
不记得我是否设置了密码。有谁知道怎么重置?