PowerShell 09: Functions 2 - Advanced Functions

preview_player
Показать описание
More Advanced Functions *Chapters*
1. (00:15) Functions With Parameters that Take Arguments
2. (00:49) Defining Parameter Functions
3. (01:28) Calling / Invoking Parameter Functions
4. (02:32) Auto-Complete and Inteli-sense in ISE
5. (04:21) Number Game As Parameter Function
6. (11:02) Pokemon As Parameter Function
7. (13:32) Param Structures
8. (15:37) Default Parameters
9. (22:38) Functions that RETURN Values
10. (28:38) The WEIRDNESS of POSH Functions that RETURN values:
How they differ from C++ and Java methods
11. (30:06) Use Write-Host() in Functions that RETURN a Value instead of Write()
12. (32:10) The Write-Information("") Method With -InformationAction CONTINUE
13. (33:25) Parameter Functions that Both Take Arguments AND RETURN Values
14. (36:29) Parameter Functions that Take Arguments,
Have Default Values AND RETURN Values
15. (37:42) Functions Run from the COMMAND LINE that take Command Line Arguments
16. (38:03) Command Line Argument Default Array $args[$x]
17. (43:33) Pokemon Tournament With Command Line Arguments
18. (23:58) Ping Sweeper - With Default Parameter Arguments

Advanced functions that take arguments and parameters, return values and run from the command line.

Рекомендации по теме
Комментарии
Автор

Source Code:
<# #>

function Ping_Sweeper

{
param($Network, $NumHostsPerSubnet);

Clear;

for($x = 1; $x -LT $NumHostsPerSubnet; $x++)
{
$HostAddress = $Network + ($x);


Write("Host Address = " + $HostAddress);
ping $HostAddress;
}
}

<# #>

Invocations

#Remember: 0 = network and 255 = broadcast
Ping_Sweeper -Network "10.54.2." -NumHostsPerSubnet 255

#Title: PowerShell - Module 07 - Classes - Adventure Game 2
#Author: Carly S. Germany
#Date: 06/10/2020

OneByteAtATime
Автор

Hello, thank you for all the information you 've shared with us, could you please supply me with some exercises with the result, I will be so great full.

Camoranizi
visit shbcf.ru