Adding extended properties as NoteProperties

Continuing my post on Filtering files by their metadata (extended properties), and a question raised by Ankor in the comments section, I decided to quickly wrap up a new function (based on the one in the post) that simply adds the specified extended properties as new note properties to the object in the pipeline. As…

3

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

Copy files to an Azure VM through PSRemoting

You may sometimes need to copy a file to a remote machine where the SMB (aka cifs) ports are closed, or the option to copy files through the RDP connection is disabled as well. Also, you may need to copy the file(s) as a step in an automated process. If you have PowerShell 5.0 installed…

0