I am developing in Sharepoint and I like more Windows Powershell than Sharepoint Management Shell. Every time I restart the development machine, I have to run Add-PSSnapin Microsoft.Sharepoint.Powershell in order to use Sharepoint cmd-lets.

How to get the machine to automatically load Sharepoint snapin when I start Windows Powershell.

-ErrorAction SilentlyContinue so it doesnt throw an error if module is loaded. Note that this will actually throw an error in SharePoint shell, since SharePoint doesnt check if module is already loaded :-(
–
Anders RaskJun 23 '11 at 12:34

rask: it can be usefull in .ps1 file, as I can add the snapin in the head of the file, and run the ps1 either from a naked powershell console, or a sharepoint powershell console.
–
Steve BJun 23 '11 at 12:41

When I run notepad $profile it says: The system cannot find the path specified. So I created this file manually and added Add-PsSnapin Microsoft.SharePoint.PowerShell -EA 0. Thank you for your answer!
–
Anatoly MironovJun 23 '11 at 14:08

yep, if its not created you just save it. Glad to be of help.
–
Anders RaskJun 23 '11 at 14:12

It works. But is there is a possibility to add it to profile ps1 or something so one doesn't need to create custom shortcuts? I like the pinned shortcut on the panel.
–
Anatoly MironovJun 23 '11 at 11:20