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

PowerShell

Making a cozy PowerShell home

During the Chicago SharePoint 2010 road show (#SharePointRS) Darrin Bishop (@bishopd) showed us a cool admin trick with the below command:

Add-PPSnapin Microsoft.SharePoint.PowerShell

NAME
    Add-PSSnapin

SYNOPSIS
    Adds one or more Windows PowerShell snap-ins to the current session.

SYNTAX
    Add-PSSnapin [-Name] <string[]> [-PassThru] [<CommonParameters>]

Every product shipping with Microsoft now seem sot have it’s own start menu icon and matching PowerShell console.   I’m a simple guy and prefer fewer icons.   So I changed my default profile.ps1 file (C:Documents and Settings%username%My DocumentsWindowsPowerShellprofile.ps1) to have all of the cmdlets loaded in one place.

It was a nice time saver for me, give it a try on your machine! 

Hot

 

image

PowerShell Out-Grid.ps1

NOTE – PowerShell 2.0 now includes the “Out-GridView” cmdlet which removes the need for this custom .PS1 script built for PowerShell 1.0

The current release of PowerShell V1.0 does not ship with any GUI tools.    V2.0 CTP3 comes with a scripting IDE and the Out-GridView cmdlet to help with adoption and ease of use.I personally find the Out-Grid.ps1 script very handy and copy to servers whenever I want to do heavy PowerShell work.   Check it out below.

If you see an error stating that “the execution of scripts is disabled on this system” then you’ll want to run “set-executionpolicy unrestricted

image
image
image

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲