daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $name = Read-Host "Username?"
  2.  
  3. Switch ($name.length)
  4. {
  5.     {$_ -le 3} {"Name is too short min required is 3 chars yours is $_"}
  6.     {$_ -gt 50} {"Name is too long max allowed is 50 chars yours is $_"}
  7.     {$_ -gt 3 -and $_ -le 50} {"Name is good with $_ chars long"}
  8. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top