Export-CACertificatesForDscEncryption

(Updated @ 2016/05/18) When you use Desired State Configuration (DSC) and a Pull server, you should encrypt any credentials in your configurations documents. More information on this here: https://blogs.msdn.microsoft.com/powershell/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration/But instead of harvesting the certificates from the remote computers themselves (as described in the blog post above), I decided to query the CA directly, and get…

0

Disable Invoke-Expression

There was an interesting discussion in one of our internal discussion groups about disabling Invoke-Expression, so I decided to roll up my sleeves and check if it can really be done.   First of all, what is Invoke-Expression? “The Invoke-Expression cmdlet evaluates or runs a specified string as a command and returns the results of…

2

Write to HKCU from the system account

In this scenario, I needed to be able to write to the currently logged on users’ HKCU registry, but from a process being run as local system. Afterwards I even had to write the HKCU for every user that will ever logon to the machine, and for every user that already logged-on before. The solution…

11