powershell 将新的提示链接添加到SharePoint列表。也是在powershell中使用带参数的函数的示例。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 将新的提示链接添加到SharePoint列表。也是在powershell中使用带参数的函数的示例。相关的知识,希望对你有一定的参考价值。

Add-PsSnapin Microsoft.SharePoint.PowerShell

$SiteUrl = 'http://xxxx'
$topWeb = Get-SPWeb $SiteUrl
$mList=$topWeb.Lists["Linksa"]

function setNewItem($strTitle, $strLink){
$Itemx = $item = $mList.Items.Add()
$Itemx["Title"] = $strTitle
$Itemx["Description"] = "Cell"
$Itemx["LinkLocation"] = $strLink
##$Itemx["BackgroundImageLocation"] =
$Itemx["Order"] = "1"
$Itemx.update()
$mList.update()
}
setNewItem "10 Cell Assembly" "http://xxxxx/"
setNewItem "71SO" "http://xxxxx/"
setNewItem "Assembly" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Assembly/
setNewItem "CNC" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/CNC/"
setNewItem "Engineering" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Engineering/"
setNewItem "Extrusion" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Extrusion/"
setNewItem "Fibrelite" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Fibrelite/"
setNewItem "Janitor Service" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Janitor%20Service/"
setNewItem "Maintenance" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Maintenance/"
setNewItem "Metfab" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Metfab/"
setNewItem "Machine Shop-Welding" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Machine%20Shop-Welding/"
setNewItem "QC" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/QC/"
setNewItem "Roto" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/QC/"
setNewItem "Shipping-Receiving" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Shipping-Receiving/"
setNewItem "Spill Bucket" "http://portal.opwftg.com/sites/OPWSS/Teams/Safety/FCS/Cells/Spill%20Bucket/"

以上是关于powershell 将新的提示链接添加到SharePoint列表。也是在powershell中使用带参数的函数的示例。的主要内容,如果未能解决你的问题,请参考以下文章

jQuery Address 将新的深层链接附加到现有的深层链接

将新的视图控制器链接到情节提要?

将新的细粒度密码策略应用于OU

将新的 UDID 添加到配置文件后,是不是需要重建 IPA?

将新的 UITextView 动态添加到 UIscrollView

将新的 IOCTL 添加到内核中(数字范围)