lundi 25 février 2013

Powershell script parameters with complex default value

I needed to create a Powershell script with some parameters having a non-trivial default value and I didn't find any quick reference to do that. In here, I have a parameter having the current week number as a default value:

param
(
  [int] $week = $(Get-Date -UFormat %V)
)

Aucun commentaire:

Enregistrer un commentaire