Geeks With Blogs
Reidar Husmo SharePoint from the trenches Powershell
Finding the error from a correlation ID

We create an application which searches the SharePoint log for events matching correlation guids it finds on the clipboard. I.e. copy the correlation ID SharePoint gives you, switch to this application, and enjoy.

Posted On Tuesday, November 20, 2012 1:08 PM

Running Powershell from within SharePoint

This post explains how you can run a (SharePoint) Powershell command from C#/SharePoint.

Posted On Wednesday, September 19, 2012 1:17 PM

Creating large SharePoint structures from Powershell and xml, part ii

In this second part, we show how we can build an xml structure from information we get from SharePoint. This xml can later be edited, and used as input to the SharePoint creator from part i.

Posted On Saturday, June 30, 2012 7:21 PM

CAML queries for humans

In which I show how you can write CAML queries that are understandable, and show how you can query from Powershell.

Posted On Wednesday, March 28, 2012 10:40 AM

Executing timer jobs from Powershell
Starting timer jobs from Powershell is easy.Get the job, execute:$webApp = Get-SPWebApplication "http://$($env:computername... = $webApp.JobDefinitions | Where-Object { $_.Name -eq "<timer job name>"}$job.Execute([Sys... # In my timer job I don't actually use the guid, so just create a new oneWrite-Host "Done."...mostly as a reminder to myself. :-) ......

Posted On Tuesday, March 20, 2012 12:14 PM

Creating large SharePoint structures from Powershell and xml

In this two-part series, we show how we can (easily) create large SharePoint structures using Powershell and xml - and hashtables(!?)

Posted On Saturday, June 30, 2012 6:25 PM

Creating SharePoint sites from xml using Powershell
It is frequently useful to create / delete web applications in a development environment. If you need to create a structure, this can quickly become tedious. Enter Powershell, xml and recursive functions. Create the structure in xml. Something like: <Sites> <Site Name="Test 1" Url="Test1" /> <Site Name="Test 2" Url="Test2" > <Site Name="Test 2 1" Url="Test21" > <Site Name="Test 2 1 1" Url="Test211" /> <Site Name="Test 2 1 2" Url="Test212" /> </Site> </Site> ......

Posted On Thursday, April 12, 2012 2:53 PM

Powershell progress dialogs
Creating nested progress dialogs in Powershell is easy. Let the code speak for itself: for ($i = 1; $i -le 2; $i++) { Write-Progress -ID 1 -Activity "Outer loop" -Status "Tick $i" -percentComplete ($i / 2*100) for ($j = 1; $j -le 3; $j++) { Write-Progress -ID 2 -Activity "Mid loop" -Status "Tick $j" -percentComplete ($j / 3*100) for ($k = 1; $k -le 3; $k++) { Write-Progress -ID 3 -Activity "Inner loop" -Status "Tick $k" -percentComplete ($k / 3*100) Sleep(1) } } } I.e. some text that explains what ......

Posted On Wednesday, April 11, 2012 1:21 PM

Cheating at SharePoint presentations

Add a simple PowerShell script to your presentations to cache pages you're about to demo.

Posted On Monday, February 13, 2012 12:22 PM

SharePoint Powershell try catch gotcha
SharePoint 2010 developers love Powershell. It really is a huge step forward. If you still haven't started to use it, do so. But I got bit the other day, when I added a try-catch block to my code. See if you can spot it: Try { $legen = Create-Object Reidar.Husmo.AwesomeClass $legen.Dary(42) } Catch { "an error occurred" } As you no doubt immediately spotted, Powershell does not have a Create-Object. But the try-catch hides coding mistakes. There is no indication that things are not ok, not even "an ......

Posted On Monday, February 13, 2012 3:49 AM

Copyright © Norgean | Powered by: GeeksWithBlogs.net | Join free