Learn About Powershell Create Function In Detail.

Asked By 70 points N/A Posted on -
qa-featured

Hi,

I am quite curious about various blocks of PowerShell, but all I want to know about is powershell create function.

Can someone, please, tell me about creating one?

SHARE
Answered By 10 points N/A #299318

Learn About Powershell Create Function In Detail.

qa-featured

It’s quite easy in PowerShell. If you have basic programming knowledge before, then that is enough for creating a function.

Below is the syntax of a simple one

Alternatively, you can pass parameters to a function by using the keyword param.

You can even call a block by using its name such as

hello-world

Related Questions