Kelly Garcia
asked on
powershell parameter
Hi Guys,
I have found script online and it contains this code:
I really need to understand what this is saying and I am trying to advance in powershell.
to begin with what does this line mean:
[parameter(Position=0,Valu eFromPipel ine=$True, ValueFromP ipelineByP ropertyNam e=$True)]
please can someone give an explantion with examples.
thank you in advance.
Regards,
Kelly
I have found script online and it contains this code:
Param (
[parameter(Position=0,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[Alias('FullName')]
[string[]]$Path = $PWD,
[parameter(ParameterSetName='Filter')]
[string[]]$Filter = '*.*',
[parameter(ParameterSetName='Exclude')]
[string[]]$ExcludeFile,
[parameter()]
[int]$MaxAge,
[parameter()]
[int]$MinAge
)
I really need to understand what this is saying and I am trying to advance in powershell.
to begin with what does this line mean:
[parameter(Position=0,Valu
please can someone give an explantion with examples.
thank you in advance.
Regards,
Kelly
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617291080/ref=pd_sim_b_1?ie=UTF8&refRID=0FC6PMEBFCHFXNG2BF7R
http://www.amazon.com/Learn-PowerShell-Toolmaking-Month-Lunches/dp/1617291161/ref=sr_1_1?s=books&ie=UTF8&qid=1414481632&sr=1-1&keywords=powershell+toolmaking