-
Notifications
You must be signed in to change notification settings - Fork 0
Notes: Flow Control
Beth edited this page Sep 12, 2024
·
1 revision

- -gt => greater than
- -lt => less than
- -ge => greater than or equal to
- -le => less than or equal to



-
-
- Match zero or more characters
-
- a* - Match aA, ag, and Apple
- a* - doesn't match banana
? - Match one character in that position
- ?n matches an, in, and on but not ran

[] - Match a range of characters or specific characters
- [a-l]ook matches book, cook, and look but not took
- [bc] matches book and cook but not hook
- -match checks if string contains regex:
'book' -match 'oo'returnstrue

- -contains checks if a value is in a collection

@ sign is used to define arrays and collections
Count gives number of elements


Strings are arrays and can be defined with Write-Output








- Helps call functions from other script files
- After dot notation, the functions in the other script files can be used in the current script file