Powershell functions learning for beginners

Hello everyone,

 

I am learning windows powershell functions for scripting. I have basic understanding of concepts in powershell but unable to understand functions and how to write code Inside them. Do you know any learning source for powershell functions?

 

Thank You

If you know this already: Getting Started with Microsoft PowerShell
You could continue with this: Advanced Tools & Scripting with PowerShell 3.0 Jump Start

This is fully documented by MS on their Docs site and lots of other places, for your consumption and use.

https://www.youtube.com/results?search_query=powershell+functions

How To Make Use Of Functions in PowerShell
https://www.jonathanmedd.net/2015/01/how-to-make-use-of-functions-in-powershell.html

about_Functions | Microsoft Docs

about_Functions_Advanced_Parameters | Microsoft Docs

about_Functions_Advanced | Microsoft Docs

about_Functions_CmdletBindingAttribute | Microsoft Docs

about_Functions_Advanced_Methods | Microsoft Docs

Powershell Functions - PowerShell Tutorial

LazyWinAdmin: Standard and Advanced PowerShell functions

Windows PowerShell: Build a Better Function
Windows PowerShell: Build a Better Function | Microsoft Learn


 

 

Powershell in a month of lunches also the Microsoft Virtual Academy

If you are using the ISE to write Powershell press ctrl J and it will auto populate with a template of the command i.e. selecting function it auto populates the below into the ISE

 

function MyFunction ($param1, $param2)

{

 

}