Hi,
I don't understand the difference between the parameter & arguments in the powershell while calling a function?
Can you guys please help me understanding the basic difference & the advantages or disadvantages?
Hi,
I don't understand the difference between the parameter & arguments in the powershell while calling a function?
Can you guys please help me understanding the basic difference & the advantages or disadvantages?
Well I don't think there is much difference between the two methods of calling a function! But its your personal liking about your style!
You can call function both ways!
Hope this helps!
Dealing with Parameters in Powershell
This is a link where you understand function with parameters!
PowerShell is a bit funky.. When you create a function and you want to supply parameters, the following format applies:
function fname {
param([string]$a, [int]$b) # the two parameters.
write-host ("a = " + $a)
write-host ("b = " + $b)
}
This is what I think you will find it more helpful!
http://powershelllive.com/blogs/lunc...-vbscript.aspx
and
http://poshoholic.com/2007/10/06/pow...ion-or-script/
Hope this helps!
Bookmarks