Get-OneMillionDigitsofPi

After showing a customer the PI static method of System.Math, they asked, “how do I get more digits?”.   A quick bit of lateral-thinking, i.e. cheating, later and a with more than a nod to the hard work done by the folks at angio.net, here’s the wonderfully named Get-OneMillionDigitsOfPi function.   function Get-OneMillionDigitsOfPi { (Invoke-WebRequest -Uri “http://www.angio.net/pi/digits/pi1000000.txt”).Content…

0

One-Liner: Find a Renamed and Relocated AD Guest Account WITHOUT using the Well-Known SID

So… someone decided to rename and move the domain’s Guest account. You could find searching via the well-know SID… SID: S-1-5-21domain-501 Name: Guest Description: A user account for people who do not have individual accounts. This user account does not require a password. By default, the Guest account is disabled. Or… you could try this little trick…  …

0

Use PowerShell to Show User Rights Assignments Set by Group Policy

Here’s one I came across whilst performing some Group Policy troubleshooting…   Get-CimInstance -Query “Select * from RSOP_UserPrivilegeRight where precedence=1” -Namespace root\rsop\computer | Select-Object UserRight,AccountList   13   It shows the UserRight set by Group Policy and who has it.  

0

Stop PowerShell.exe from Starting!

What!? “Have you gone mad?“, I hear you cry! Last month (and year), I posted about limiting the functionality of PowerShell – Security Focus: Set ConstrainedLanguage Mode on My Machine. This month (and this year), I’ve found an oddity with this particular UNSUPPORTED technique…   Warning: Don’t Try This At Home! Whilst playing around with the __PSLockdownPolicy setting, I discovered that…

0