Power Shell – ISE

What is PowerShell ISE?

The PowerShell Integrated Scripting Environment (ISE) is a graphical application for Windows PowerShell.

PowerShell ISE Features

  • A Command pane for running interactive commands.
  • A Script pane for writing, editing, and running scripts.
  • Open 8 execution tabs which can run in parallel and in the same time
  • Multiline editing in the Command pane lets you paste multiple lines of code, run them, and then recall them as a unit.
  • A built-in debugger for debugging commands, functions, and scripts. You can set and remove breakpoints, step through your code, check the values of variables, and display a call-stack trace.
  • Customizable features let you adjust the colors, font, and layout.
  • A scriptable object model lets you further customize and extend Windows PowerShell ISE. You can add functionality, including menu items. Also, you can access the session, the files, and the editor to create your own features.
  • Line and column numbers, keyboard shortcuts, tab completion, context-sensitive Help, and Unicode support make Windows PowerShell ISE an efficient and productive environment for using Windows PowerShell. Windows PowerShell even lets you open files by using a drag-and-drop operation.

How to install it?

Go to “Server Manager

Go to “Features” and the “Add Features

PowerShell Issue after Installing SharePoint 2010 SP1

After installing SharePoint 2010 SP1 on my VM, I opened the PowerShell to execute one Cmdlet.

But L , I got the following error in any CmdLet..

The complete error is:

Install-SPRSServiceProxy : Microsoft SharePoint is not supported with version

4.0.30319.17626 of the Microsoft .Net Runtime.

At line:1 char:1

+ Install-SPRSServiceProxy

+ ~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : InvalidData: (Microsoft.Repor…ingServiceProxy:

InstallReportingServiceProxy) [Install-SPRSServiceProxy], PlatformNotSuppo

rtedException

+ FullyQualifiedErrorId : Microsoft.ReportingServices.SharePoint.PowerShel

l.InstallReportingServiceProxy

Solution

Right click on “SharePoint 2010 Management Shell”

After the properties windows opened, you will see the below screen

Add “-version 2” in the Target field

Try now ūüėČ

Error When Creating TFS SiteCollection Portal In SharePoint 2010

When you trying to create TFS team project portal from Central Admin you get the following error:

Feature with Id ‘4e72d346-276f-47b3-8d10-56e474a4fe4a’ is not installed in this farm, and cannot be added to this scope.¬†

Solution:

  1. Ensure that you installed Visual Studio Team Foundation Server on all farm servers.
  2. Install the feature TfsDashboardBaseContent  manually using PowerShell.
    Install-SPFeature -path "TfsDashboardBaseContent"
  3. Re install the three WSPs files related to the TFS using PowerShell with -Force parameter, you can find those files in the following path C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Templates
  4. Deploy the three solutions.

Access Denied When Upload SWF File to SharePoint 2010

I have a user with with “Contribute” permission. But when he need to upload an SWF file to a document library, he got “Access Denied” while he can upload another file????

Solution

The solution is in PowerShell….

Open the PowerShell

write the follwoing commands:

$webApp=Get-SPWebApplication <YOUR WEB APPLICATION URL>
$webApp.WebFileExtensions

This will print the following extensions:
ascx
asmx
aspx
jar
mast
swf
xap
xsf
xsn

“swf” is there…

To remove this file extension use the follwoing CmdLet.
$webApp.WebFileExtensions.Remove(“swf”)

or you can add a new extension if you have security requirements, like this:
$webApp.WebFileExtensions.Add(“js”)

For more details: Microsoft Support