Extending columns in Powershell

When executing a Powershell command, you may find that, depending on the amount of characters, some of the output is not visible as the underlying table view is truncated.

For example, within a SharePoint Powershell prompt, if you run ‘Get-SPFeature’, any ‘character-heavy’ ‘Display Names’ are masked:

However, if you add the following to your cmdlet, the full context of the output is visible:


Which SharePoint Server is publishing my SSRS Reports?

To provide resilience and to share performance load, the recommended approach is to have multiple (well, more than one anyway!) SharePoint Servers publishing your SSRS reports (in SharePoint mode).

The introduction of SQL 2012 certainly enhanced the load-balancing capabilities which weren’t as stable and effective in SQL 2008 R2, but regardless of which version of SQL you are leveraging, there is no quick way of identifying which server was publishing your report. But here’s the trick, instead of trawling through the ULS logs, put SharePoint to one side for a minute and kindly ask a DBA to open SQL Management Studio for you.

And run the following SQL query (uses the ‘Execution_log’ View)

/****** Script for SelectTopNRows command from SSMS ******/
TOP 100 [InstanceName], [ReportID], [UserName], [RequestType], [Format], [Parameters], [TimeStart], [TimeEnd], [TimeDataRetrieval], [TimeProcessing], [TimeRendering], [Source], [Status], [ByteCount], [RowCount]

Capture your Powershell session

Never again will you be reaching for the swear box after writing some decent Powershell and closing the window before saving.


Just add the following to each new session;

PS > Start-Transcript (will be written to your profile – i.e C:\Users\Documents\Powershell_transcript.******.txt)


Powershell speaks…if you ask nicely enough!

How cool would it be if ‘Mr Windows Server’ could find the time to notify you that your Powershell script has finished? Well, he can, just add this to your script, ramp up the speakers and you have a new friend letting you know when he’s done!

$MrWindows = new-object -com SAPI.SpVoice
$MrWindows.Speak( “Farm Configuration completed!”, 1 )


$Voice = new-object -com SAPI.SpVoice
$Voice.Speak( “Bore off, I am trying to watch the X Factor!”, 1 )