github.com/hashicorp/packer@v1.14.3/provisioner/powershell/test-fixtures/scripts/set_version_latest.ps1 (about)

     1  # Test fixture is a modified version of the example found at
     2  # https://www.powershellmagazine.com/2012/10/23/pstip-set-strictmode-why-should-you-care/
     3  
     4  Set-StrictMode -Version Latest
     5  $ErrorActionPreference = "Stop"
     6  
     7  $myNumbersCollection = 1..5
     8  if($myNumbersCollection -contains 3) {
     9      "collection contains 3"
    10  }
    11  else {
    12      "collection doesn't contain 3"
    13  }