我想使用 powershell 将 QuickLaunch 链接添加到站点。
我目前使用的脚本是:
$web = Get-SPWeb http://sp_3/Deps
$node = New-Object -TypeName Microsoft.SharePoint.Navigation.SPNavigationNode
-ArgumentList "LinkTitle", "http://sp_3/Deps/SUP"
$web.Navigation.QuickLaunch.Add($node);
$web.Update()
这会导致以下错误:
Can not find an overload for the "Add" and the number of arguments: "1." line: 1 char: 32
+ $ Web.Navigation.QuickLaunch.Add <<<< ($ node);
+ CategoryInfo: NotSpecified: (:) [], MethodException
+ FullyQualifiedErrorId: MethodCountCouldNotFindBest
我究竟做错了什么?