How to suppress overflow-checking in PowerShell?
问题 PowerShell seems to perform bounds-checking after arithmetic operations and conversions. For instance, the following operations fail: [byte]$a = 255 $a++ $a = [byte]256 Is there any way to enforce overflows or the typecast without resorting to a manual calculation via modulo or C# and Add-Type? 回答1: The behavior you want in PowerShell is achievable, though, it's a bit of a hack; and maybe there's a better way. If you just want cryptographic functionality though, it's worth calling out, that