As we all Know Powershell is Powerfull and i am playing with Powershell for Quite sometime.Now everytime i start Powershell ISE First i need to run following command in order to get access of all commands for Sharepoint 2010 and also i need to run all User Define Powershell functions.
Wouldn’t be nice if we get all functions and above command run once we Start Powershell ISE ? Here is basic steps for that
Type $Profile on Command Line and u will get some path in my case i have “C:\Users\LoginUser\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1”.
Now Create File called Microsoft.PowerShellISE_profile.ps1 at above address and add command
Now add code for all user Define functions that you want to use everytime and save file.Restart ISE and Type some Sharepoint Powershell command
or User define function name and u will get result.
Note if you are using Sharepoint 2010 Powershell host you don’t need to add Add-PSSnapin “Microsoft.Sharepoint.Powershell” and Also ISE is installed with Server but u need to activate it in order to Use.
Credit for this goes to book called Professional Sharepoint 2010 Administration……..