$web = Get-SPWeb -Identity https://sharepoint/sites/PowerShellTests $folder = $web.Folders["Workflows"] $property = $folder.Properties["docid_msft_hier_listid_validate"] $dt = Get-Date -Year 2100 -Month 12 -Day 31 $folder.Properties["docid_msft_hier_listid_validate"] = $dt $folder.Update() $web.Update()
$url = "https://sharepoint/sites/PowerShellTests" $web = Get-SPWeb $url $lib = $web.GetList($web.Url + "/oldName") $rootFolder = $lib.RootFolder $rootFolder.MoveTo($web.Url + "/newName")
$wa = $get-spwebapplication "my site host url"$wa.Sites | foreach-object { if ( $_.Url.StartsWith("my site host url/personal") ) { Set-SPSite -Identity $_.Url -QuotaTemplate "Personal Site" }}
$analytics = Get-SPUsageDefinition | where { $_.Name -like "Analytics*" } $pageRequests = Get-SPUsageDefinition | where { $_.Name -like "Page Requests" }
$analytics.Receivers.Count $pageRequests.Receivers.Count
if ($analytics.Receivers.Count -eq 0) { $analytics.Receivers.Add( "Microsoft.Office.Server.Search.Applications, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c", "Microsoft.Office.Server.Search.Analytics.Internal. AnalyticsCustomRequestUsageReceiver") } if ($analytics.EnableReceivers -eq $false) { $analytics.EnableReceivers = $true $analytics.Update() } if ($pageRequests.Receivers.Count -eq 0) { $pageRequests.Receivers.Add( "Microsoft.Office.Server.Search.Applications, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c", "Microsoft.Office.Server.Search.Analytics.Internal. ViewRequestUsageReceiver") } if ($pageRequests.EnableReceivers -eq $false) { $pageRequests.EnableReceivers = $true $pageRequests.Update() }
<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0"> <Method ID="1" Cmd="Update"> <Field Name="ID">SubItemID</Field> <Field Name="ParentID">ItemID</Field> </Method> </Batch>