Convert decimal to hex in Bash, hexadecimal to decimal and dates to Unix timestamp

Emulate ternary operator in PowerShell

PowerShell ternary operator emulation for PowerShell 5.1. Quick and dirty determine if a condition is true or false by emulating the ternary operator. For example when determinering if the server you are servicing is a Windows Server Desktop Experience version or not (and thus Server Core).