Tag Archive: one-liner

Aug 17

PS One-Liner: #6 Remove orphaned unresolvable SIDs

I was asked for a PowerShell script to remove unresolvable SID’s because of a migration. User accounts didn’t exist on the target machine and the customer wanted to open up the security tab without any wait time and see a cleaned up and ordered ACL list. Since I adopted PSreadline every maintenance task is scripted …

Continue reading »

Jun 09

PS One-Liner: #5 Create multithreaded processes

This one is a golden oldie and used for migrating data using robocopy.  Let’s start with a simple example.

First we begin with an array ”@(notepad…)’ where we define the processes to start. Then we use foreach ‘%’ which fetches each item in the array as a pipeline item ‘$_’ and then checks how many …

Continue reading »

Sep 05

PS One-Liner: #1 Lowercase your text and paste it to the clipboard, batch style!


Because we had to comply with a naming convention in a system not managed by yours truly, I had to manually set each uppercase FQDN server name to lowercase in a GUI. Beware, I litterally HATE manual tasks which should and could be automated somehow even if took more time to script, there is always …

Continue reading »