Override build-in cmdlets in Powershell

Hello,

Is it possible to override build in cmdlets in Powershell with my own ones. Like for example I want to have a common library which will be dot sourced and I will specify my own Send-Mail function there which will provide generic services for all my scripts with defaults I want. I understand I can write my own function with my own name but I already have tons of scripts relying on Send-Mail cmdlet and would like to override if it’s possible with utility script I will to all my scripts instead.

Yep. If you define a function with the same name as a cmdlet, the function will be resolved first, as detailed in the about_Command_Precedence help file (https://technet.microsoft.com/en-us/library/hh848304.aspx). This is what allows proxy functions and other such tricks to work.