In the last post , I went into a bit of what bitwise AND does, looked at the binary equivalent of the userAccountControl (UAC) value, and showed some visual examples of how calculations are done to find the applied flags. In this post, I thought I’d go through exactly how you do this. So first off, dust off your calculator and get into Programmer mode. Since Windows 10 has a beautiful calculator, I’ll be doing my demonstration on that. CONVERTING INTEGERS TO BINARY IN CALCULATOR You’ll cry when you see how easy this is. Make sure your calculator is set to DEC. Type in your value. Observe the BIN value. Done! When I copy and paste out of the calculator, I get 00010000001000000000. HOW ABOUT POWERSHELL? Well, sure. In this case, we can use the [convert] class to switch the value to base2 format. Check it out: [Convert]::ToString(66048, 2) This outputs the exact binary value I had before with the leading zeroes stripped off -- 10000001000000000. Note all I did was a
notes, ramblings, contemplations, transmutations, and otherwise ... on management and directory miscellanea.