Monday, 9 September 2013

How do you provide defaults to powershell scripts

How do you provide defaults to powershell scripts

I have a script such as the following:
param([parameter(mandatory=$true)][string]$sourceFolder)
write-host $sourceFolder
How do I provide a default value for the $sourceFolder parameter such that
the parameter becomes optional?

No comments:

Post a Comment