Tag Info

Hot answers tagged

4

Seems to me you have not a complete understanding of the logic you are trying to write? Let me give you an example of how your code works now: You have items 1 2 3 4 5 6 7 8 9 10 You retrieve them backwards (say you set RowLimit=5 for now) so you will get: 10 9 8 7 6 Then you save the 6 in a variable When the user click on "Show more" or whatever, ...


2

It's because $lista is $null. Are you sure this is correct title of the list? In PowerShell you won't get error when you try load list with incorrect title. You also won't get exception executing follofing: $null.Something foreach ($a in $null) {} That's why you get an exception so late, on the Update() method. You should also use Get-SPSite instead of ...


2

I think you should check on 2 things In $item["title"] you should use casing, because SharePoint understands Title hence improve it to $item["Title"]. I guess you don't need $lista.update() Refer below updated code. #Add SharePoint PowerShell Snapin which adds SharePoint specific cmdlets Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue ...


1

This powershell script will show the name of all content types that contains a field by its name. $site = Get-SPSite http://YourSiteURL $web = $site.RootWeb $columnName = "Your_Site_Column_Name" $guid = $web.fields[$columnName].id $contentTypes = $web.AvailableContentTypes for ($x=0; $x -lt $contentTypes.Count; $x++) { for ($y=0; $y -lt ...


1

Correct, only the current version impacts the LVT.


1

#get web and ct $web = Get-SPWeb http://your/site/name $ct = $web.ContentTypes["CT name"] #get the column from the web $spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["alias"]) #Remove the field from the ct and update $ct.FieldLinks.Delete($spFieldLink.Id) $ct.Update() #dispose the web-object $web.Dispose()



Only top voted, non community-wiki answers of a minimum length are eligible