Day 5
Arrays and hash table in PowerShell
• $arr = @() is an example of array declaration.
• $arr = 1,2,3
• $ht = @{} is an example of hash table.
• $ht = @{1=‘first’,2=‘second’,3=‘third’}
• Hash table is key-value pair data type.
Operators in PowerShell
• Arithmetic operators : +, - , /, %
• Comparison operators : -eq, -ne, -lt, -gt, -le, -ge, -contains, -
notcontains
• Wildcard and RegEx : -like, -notlike, -match, -notmatch, -replace
• Logical and bitwise : -and, -or, -xor, -not, -band, -bor, -bxor, and -bnot
ThankYou!

Power shell basics day 5

  • 1.
  • 2.
    Arrays and hashtable in PowerShell • $arr = @() is an example of array declaration. • $arr = 1,2,3 • $ht = @{} is an example of hash table. • $ht = @{1=‘first’,2=‘second’,3=‘third’} • Hash table is key-value pair data type.
  • 3.
    Operators in PowerShell •Arithmetic operators : +, - , /, % • Comparison operators : -eq, -ne, -lt, -gt, -le, -ge, -contains, - notcontains • Wildcard and RegEx : -like, -notlike, -match, -notmatch, -replace • Logical and bitwise : -and, -or, -xor, -not, -band, -bor, -bxor, and -bnot
  • 4.