November 2018
Intermediate to advanced
566 pages
17h 15m
English
When you convert a script into a function, the function retains all of the capabilities of a script. However, simply calling the script is not sufficient when you want to get tasks done. Now, you first load the script—and all of the functions and other parts of it—into the session, and then call the function of your choice. Functions may or may not contain parameters. When present, parameters can be called along with the function, just like how you would a cmdlet. However, it would not be as follows:
PS> Start-Count.TotalTime(5)
Instead, it would be like this:
PS> Start-Count -TotalTime 5
Remember to call the scripts that contain functions ...
Read now
Unlock full access