IIS Web サイトの展開を自動化する PowerShell スクリプトを作成しようとしています。32 ビット環境の Windows Server 2008 R2 マシンでスクリプトを実行しようとしています。
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
次のような WebAdministration コマンドを実行するたびに:
Get-Website -Name "MYWebsite"
次のようなエラーが表示されます。
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
PowerShell.exe の 64 ビット バージョンに切り替えると、この問題は解決しますが、Microsoft Team Foundation Server 2008 Power Tools PSSnapin も使用できなくなります。
どうすればこれを克服できますか?前もって感謝します。