Category: Technology

  • Adding a Yes, No, Cancel prompt to a PowerShell script

    When I write PowerShell scripts, I often want to step through sections. This allows me to decided whether to proceed with parts of my script or not. I achieve this by using the ChoiceDescription class as demonstrated below.

    More information about using prompts in PowerShell can be found in the following article and tip on Microsoft TechNet.

  • Clear the SharePoint Quick Launch using PowerShell

    Clear the SharePoint Quick Launch using PowerShell

    Today I had a requirement to remove all the headings and links from the quick launch navigation of hundreds of SharePoint sites. The sites were being provisioned as part of a PowerShell deployment script that was deleting the default list and libraries. Going through each of these sites manually was not an option – so I edited the deployment script to include a function to remove the headings for me.

    SharePoint Quick Launch with Headings
    SharePoint Quick Launch with Headings

    I remembered doing something similar to this back on SharePoint 2007 but I didn’t have access to the previous script or project and instead had to research the subject for a while to find what I needed.

    Solution

    A post from Get-SPScripts supplied me with what I was after, although it was part of a much larger script. So I picked away at their code and made it into the following PowerShell function to re-use in other projects.

    The above Remove-SPQuickLaunchLinks function will remove all headings and links from the SharePoint quick launch for a particular site.

    Empty SharePoint Quick Launch
    Empty SharePoint Quick Launch

    Remember to review, rename and test this script before using it in a production environment.

  • Backup and download solutions in SharePoint from the configuration database

    Backup and download solutions in SharePoint from the configuration database

    The need to backup or download SharePoint solutions or WSPs from SharePoint come’s up from time to time. This usually crops up for me when upgrading client environments, and they have forgotten where they put their original solutions, or there is a discrepancy as to which version they installed.

    To download the solutions from the config database run the following PowerShell script. This will save all of the solutions stored in SharePoint’s config database to a directory (“C:\Solutions”) on the local machine.

    Remember to review, rename and test this script before using it in a production environment.

  • Review, rename and test

    Review, rename and test

    Review

    It goes without saying…but whenever you download and use any code or script from this site, or any site for that matter, you should review and understand what the code or script is doing before you attempt to use it.

    Rename

    Using the PowerShell scripts that I share as an example. I distribute these scripts as text files as it provides an opportunity to review the script, after which you can knowingly rename the file. This also prevents any hastily or accidental execution of the script.

    Test

    And as with anything you download from the internet – you should test it in a dedicated environment prior to any production environment.

  • Remote Desktop Connection Manager

    When I started my new job a few weeks ago I decided I was going to introduce some new tools and utilities to help myself and my colleagues be more productive. The first one I brought to their attention was Remote Desktop Connection Manager (RDCMan) from Microsoft.

    Remote Desktop Connection Manager (RDCMan)
    Remote Desktop Connection Manager (RDCMan)

    I’ve known about this tool for almost a year now but it always surprises me how few administrators out there don’t know about this tool. It’s a must-have for any System Administrator using mstsc.exe or Remote Desktop to manage more than one server or computer!

    RDCMan manages multiple remote desktop connections. It is useful for managing server labs where you need regular access to each machine such as automated check-in systems and data centres. It is similar to the built-in MMC Remote Desktops snap-in but more flexible.

    Remote Desktop Connect Manager can be downloaded directly from the Microsoft Download Centre.

    Please also say a big thank you to Julian Burger the developer at Microsoft who wrote this awesome tool and David Zazzo for working to get it released! You can read about how David discovered Julian’s RDCMan tool within an internal Microsoft repository and worked to get it licensed for external distribution on the Exchange TechNet Blog.

  • Why WordPress and not SharePoint?

    Why WordPress and not SharePoint?

    Many people have said to me “your using WordPress for your blog but you’re a SharePoint Consultant” and my response is typical “but why must use SharePoint – I guess you also have a problem with me using a Mac?”.

    Yes, I do work with SharePoint – in fact, it goes beyond just working with it but we won’t go there. I have developed websites for many years and typically chosen to build these on the WordPress platform – it’s adaptable and responsive to the differing requirements and yet it doesn’t need weeks of custom development. Not only that but it was built for blogging and the user interface is more in tune to writing blog posts. Secretly I knew if I used SharePoint for my blog it would become more of a job than a hobby with all the extra work it would need.

    SharePoint is just not the blogging platform for me – let’s just say when I’m blogging I want the night off!