私は現在、次のPowershellスクリプトを作成しようとしています。このスクリプトは、SharePointの用語で、サーバーの全体管理URL(で取得$adminUrl
)を取得し、そのURLでInternetExplorerウィンドウを開きます。
また、メソッド$adminUrl
に渡す前に別の文字列を追加しています。Navigate
$adminUrl = Get-spwebapplication -includecentraladministration | where {$_.DisplayName -eq "SharePoint Central Administration v4"} | select Url
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate($adminUrl + "/someurl") # <= Trying to pass the url here
$ie.Visible = $true
しかし、そうしようとすると、この例外が発生します。
Cannot find an overload for "Navigate" and the argument count: "1".
At \\a\setup.ps1:9 char:1
+ $ie.Navigate($adminUrl)
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest
ここでキャストの問題に直面していますか?