Regex in Powershell

With the help of these three blogposts: https://blogs.technet.microsoft.com/heyscriptingguy/2011/05/15/simplify-your-powershell-script-with-parameter-validation/ https://blogs.technet.microsoft.com/heyscriptingguy/2011/01/11/validate-powershell-parameters-before-running-the-script/ https://kevinmarquette.github.io/2017-07-31-Powershell-regex-regular-expression/#validatepattern I created a Powershell Parameter validation check to make sure the server I was running a script against was one of five sequentially numbered servers: Param( [Parameter(Mandatory=$true)] [ValidatePattern(“Server[1-5]”)]     [STRING]$Server ) Advertisements