Reputation: 1925
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?
Upvotes: 0
Views: 68
Reputation: 1925
DOH! Just figured it out....
param([string]$sourceFolder = "1234")
Upvotes: 1