Bitwise Shift

PowerShell contains some binary operators that are not so commonly used, for example bitwise shifting. The -shl operator shifts bits to the left:

 
PS> 1 -shl 1
2

PS> 2 -shl 1
4

PS> 3 -shl 1
6
 

Twitter This Tip! ReTweet this Tip!