title: How to check if a PowerShell optional argument was set by caller
body: <p>I have a script which takes these arguments:</p>
  
  <pre><code>param (
      [parameter(Mandatory=$true)][ValidateRange(1, [int]::MaxValue)]
      [Int]$startRevision,
  
      [parameter(Mandatory=$true)][ValidateRange(1, [int]::MaxValue)]
      [Int]$endRevision,
  
      [parameter(Mandatory=$false)][ValidateRange(1, [int]::MaxValue)]
      [Int]$stepSize = 10,
  
      [parameter(Mandatory=$false)]
      [String]$applicationToBuild
  )
  </code></pre>
  
  <p>Since the last argument is optional, I would like to know if the argument is set. Is there any way to do this?</p>
  
  <p>A default is not ok, since I don't want to use the variable if it is not set. I could use a default which is a "ThisIsNotSet" and check if the value is equal to this string, but is there a better solution?</p>