Author: jbmurphy
-
How we recovered from a Microsoft SQL 2005 suspect msdb database
I am not a MS SQL Server guru. Honestly, it is a “set it and forget it” technology for me. After our last patching episode, we ended up with a SQL Server Agent offline, and our msdb file was listed as suspect. Seems like there are 2 ways to recover from this. 1 restore a…
-
Using cURL to pull Google Reader starred items – Part 2 UnStaring in Google Reader
In the first part of this tutorial, I pulled a couple of variables from the XML feed of my Google Reader’s “starred items”. Now I wanted to “process” the item and UnStar it. This was not easy for me to put together – it was my first attempt at working with the Google API. First…
-
Using cURL to pull Google Reader starred items – Part 1 xpath
A while ago, I wrote a post about using ruby to parse the xml feed of shared starred items in Google Reader. One thing that I did not like about this solution was that I could not get the URL AND mark the item as un-starred. Since I had been playing with REST in these two…
-
PowerShell code to update a CRM 2011 field (using REST/oData)
In this earlier post I showed how to loop through all the contacts in CRM 2011. Next thing I wanted to do was to update a field on each Account. So I needed to figure out how to update data, not just read it. Here is the code to do that:
-
PowerShell, JSON, oData and CRM 2011 (or SharePoint 2010)
I am working on how to consume data from/to SharePoint 2010 and from/to CRM 2011. I decided to try and see if I can get the data to display in PowerShell, figuring if I can get it there, I should be able to get it anywhere? Here is the code to loop through all the…
-
How to tell if your PowerShell session is remote
I wanted to write a conditional to prevent certain things from runing if in a remote PSSession. If you are in a standard PowerShell session the following is returned: [Environment]::GetCommandLineArgs()[0] = C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe If you are in a remote PSSession: [Environment]::GetCommandLineArgs()[0] = C:\Windows\system32\wsmprovhost.exe
-
How to add custom CSS code to all SharePoint 2010 pages (CustomAction)
It occurred to me that you can add a CSS link to the top of each page using the same method that I showed in this post. The only thing you change is the code in “CustomAction”. The code would be”
-
How to add custom JavaScript code to all SharePoint 2010 pages (CustomAction)
There are plenty or articles on how to do this. This is more of a note for myself, as I have to “re-learn” this every time I need to customize SharePoint. There are 2 ways (that I know of) that you can add code to every page in SharePoint 2010, 1 by the AdditionalPageHead delegate…
-
How to use Visual Studio to package a SharePoint solution if you don’t have SharePoint installed
I re-image my machine often, and when I fire up a Visual Studio 2010 for the first time, I always get an error “To work with this project, either SharePoint Foundation 2010 or SharePoint Server 2010 must be installed on the system” or “A SharePoint server is not installed on this computer. A SharePoint server…
-
How to tell if your PowerShell function was called by name or by alias
I been wanting to write functions that act differently depending on how they were called. I am not sure if this is good practice or not, but I like the idea. Turns out all you need is “$MyInvocation.InvocationName” Look at they following code: If you call the function by alias you get : This function…
