$Args in PowerShell

Just a tip #3

In scripting, there are many things to experience in many ways, the traditional way is always the best practice though, the formal way is always an option…

Function Add
        [int] $Number1,
        [int] $Number2

    [int] $Sum = 0
    $Sum = $Number1 + $Number2
    return, $Sum

Add -Number1 4 -Number2 5

Formal way

$Add = {$args[0] + $args[1]}

. $Add 4 5

Share it on     |   |   |   | 

SQL Server PSObject - Working With SQL Server Using PowerShell


List Of Available Azure VM Image Skus Using New Azure PowerShell Module Az

comments powered by Disqus