在“ $spWeb. list” 的直线上, 我正在获取“ 无法索引为空数组” 的“ 无法索引为空数组 ” 。
Im使用Windows7家居补贴和股份基金会2010年
I tried to add the user to shell Add-SPShellAdmin -username -database .. failing informing error is that the account name was already added to the database as a login using a different user name than the account
请建议!
"============================================================================="
$PSSnapin = Remove-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null
$PSSnapin = Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null
$spWeb = Get-SPWeb http://krishna-hp:11944/sites/sh100/
$spList = $spWeb.List["products"]
$newItem = $splist.Items.Add()
$newItem["Title"] = "this is title"
$newItem["product_id"] = 34
$newItem["product_desc"] = "this is from poershell"
$newItem["price"] = 123
$newItem.Update()