Personal Web & Sample Site
Skip Navigation Links
About Me |
| Contact Us
Don't See Microsoft.SharePoint.PowerShell
Rating: 2 user(s) have rated this article Average rating: 5.0
Posted by: joet, on 11/2/2013, in category "SharePoint"
Views: this article has been read 3711 times
Location: Houston, Tx, United States
Abstract: You're working with PowerShell in 2013 and you don't see Microsoft.SharePoint.PowerShell in the dropdown menu and you keep having to add it each time you have to create/write a script. Run the following script to run create a profile script if one doesn't exist already.

** Without brackets **

[ if (!test-path $profile.AllUsersAllHosts)) (new-item -type file -path $profile.All

powershell_ise $profile.AllUsersAllHosts ]

That will open a new tab in PowerShell ISE allowing you to edit profile.ps1. You will also the path bellow after you execute the script.

In the new tab execute the following script:

$ver = $host | select version

if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"}

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)


    Add-PSSnapin "Microsoft.SharePoint.PowerShell"


Now close and reopen PowerShell ISE and you will now see "Microsoft.SharePoint.PowerShell" in the dropdown menu.

Of course of got this tip from PoweShell guru Gary LaPointe. This guy has been around forever!

There is also another way to do it but I'll let you find it on Gary's post. It's a much easier way!

How would you rate this article?

User Feedback

Post your comment
Insert Cancel

Copyright © 2013 Jose M. Tamez
Last Updated August 18th 2013