How to setup your most used templates in PowerShell_ISE
The success story for visual studio is the fact that you have tones of templates that saves your time and let you focus in the main idea and the ultimate goal for your code.
Powershell_ISE provide this capability for most generic scripting techniques that you usually use.
Click Start Snippets and select the script code you want.
You can create your own snippets for most common codes/APIs/connections that you usually use.
This code will add a new snippet for outlook object mode
$m = @'
# Connect to outlook $Outlook = New-Object -comobject Outlook.Application $namespace = $Outlook.GetNameSpace("MAPI")
# Connect to the inbox folder $inbox = $namespace.GetDefaultFolder(6) '@
New-ISESnippet -Text $m -Title ‘MyOutlook' -Description “MyOutlook" ` -Author "Ahmed Ashour" -Force