Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

July 2015

Write to SPList remotely with PowerShell SOAP

Have you needed to write to a SPList on a remote target farm?    Get-SPSite works great locally, but remote scenarios need different techniques.   The below PowerShell will write to a SharePoint list remotely over HTTP using the SOAP endpoint “Lists.asmx” by sending  XML with the action detail (insert command and field values).  

Cheers! 

shades_smile

 

PowerShell

Function WriteCAML($targetUrl, $targetListName, $data) {
	# Open remote service
	$uri = $targetUrl + "/_vti_bin/lists.asmx?WSDL"
	$service = New-WebServiceProxy -Uri $uri -Namespace SpWs -UseDefaultCredential
	# Get list and view ID
	$detail = $service.GetListAndView($targetListName, "")
	$listid = $detail.ChildNodes.Item(0).Name
	$viewid = $detail.ChildNodes.Item(1).Name
	
	# Make batch with attributes
	$doc = New-Object System.Xml.XmlDocument 
	# NOTE - Empty viewname will use the default view   
	$batch = $doc.CreateElement("Batch")            
	$batch.SetAttribute("onerror", "continue")            
	$batch.SetAttribute("listversion", "1")            
	$batch.SetAttribute("viewname", $viewid)  
	$batch.InnerXml += "" +
		"$title"+
		"$($data.sites)"+
		"$($data.webs)"+
		"$($data.dbs)"+
		""
	# Call remote service
	return $service.UpdateListItems($listName, $batch) 
}
# Main
WriteCAML "http://sharepoint/sites/metrics" "DailyStats" $data

 

References

Enable Business Intelligence on any Team Site

Have you worked on a standard SP2013 Team Site then recognized a need to activate BI features.   The BI Center template comes with a lot preloaded.   I used that baseline to compare Activated Features and got the list below.

Running this PowerShell will enable the same features so you can apply BI work to any other base template (Team Site, Community, etc.)   Cheers! 

shades_smile

 

PowerShell

# target
$url = "http://portal/sites/team"
# scope
$webfeat = "PPSMonDatasourceCtype,PPSRibbon,PPSSiteCollectionMaster,PPSWebParts,PPSWorkspaceCtype".Split(",")
$sitefeat = "BICenterDashboardsLib,BICenterDataConnections,BICenterDataconnectionsLib,BICenterDataConnectionsListInstance,BICenterPPSContentPages,BICenterPPSNavigationLink,BICenterPPSWorkspaceListInstance,BICenterSampleData,PPSSiteMaster,PPSWorkspaceList".Split(",")
# activate
foreach ($f in $webfeat) {
	Write-Host "Activating Web - $f"
	Enable-SPFeature -Identity $f -Url $url
}
foreach ($f in $sitefeat) {
	Write-Host "Activating Site - $f"
	Enable-SPFeature -Identity $f -Url $url
}
Write-Host "DONE"

Site Features

PPSMonDatasourceCtype
PPSRibbon
PPSSiteCollectionMaster
PPSWebParts
PPSWorkspaceCtype  

Web Features

BICenterDashboardsLib
BICenterDataConnections
BICenterDataconnectionsLib
BICenterDataConnectionsListInstance
BICenterPPSContentPages
BICenterPPSNavigationLink
BICenterPPSWorkspaceListInstance
BICenterSampleData
PPSSiteMaster
PPSWorkspaceList

Ready for SharePoint 2016?

As we get closer to the August release of SharePoint 2016 Preview I wanted to create a local virtual machine and try things out.   Below are steps with dozens of screenshots.   Now I’m ready for the big day to install.

Ideally matching the latest generation of all Microsoft products will give a more integrated experience.    Often in the past I’ve seen where features are disabled or less than optimal if another software layer is older.  For example,  SharePoint 2013 Business Intelligence has many features which only work with SQL 2012.   Yes, you can run older SQL 2008R2 but some features will be missing.

Here’s counting down to the SP2013 release … cheers! 

shades_smile

 

References

 

Prepare ISO and VHD

image
image
image
image
image

Windows Server – Technical Preview

image
image
image
image
image
image
image
image
image
image
image

Rename PC

image
image

 

Server Manager – AD and GUI

image
image
image
image
image
image
image
image
image

Promote Domain

image
image
image
image
image
image
image
image

Create Service Accounts

image

 

image

 

image

Install SQL 2016

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

 

Ready for SharePoint 2016

What’s in that patch? SharePoint 2013 – Jul 2015 CU

Ever wondered what fixes are inside of a given CU?   Please see attached PDF with full detail.

I wanted a new format for easy reading.   Show management and make the business case for why downtime should be taken to apply CUs.

 

As much time as I spend patching SharePoint even I never really dig into KB article fix detail.   However, this makes it easier to see everything without obscure click from one Microsoft article to the next buried layers deep.  If you found this helpful, please leave a comment.   

shades_smile_thumb_thumb_thumb_thumb

 

Whats in that patch – SharePoint 2013 – Jul 2015 CU.PDF

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲