PowerShell function - converting script into function with parameters

So you’ve been writing your scripts for some time and wondering how to make them more PowerShell-like, so that they can be invoked from the console like all the other cmdlets? In this quick video I’ll show you how to convert a sample script into function, add parameters and indicated to your user how to use your function with mandatory parameters and types. # Sample script which asks user for basic information, then manipulates it and # display some information # There's no way (at least easy) to pass these parameters from prompt, nor validate $Name = Read-Host -Prompt "What's your name?...

21 January 2022 · 2 min · 371 words · Kamil

PowerShell for IT Professionals [#20] – Next Steps with PowerShell

Congratulations! This is 20th and last lesson in the course – and my aim here is to show you various paths you can take your PowerShell journey to. I’m going to show what else you can do within PowerShell itself, as well how to keep up-to-day plus – what other doors writing code has opened for you – I’d love to hear back about this! I hope you’ve enjoyed the course so far and it will be helped you in some way – either solve a problem, got promotion, or simply learnt something new....

26 November 2020 · 2 min · 239 words · Kamil