Monthly Archives: August 2013

[C#/PowerShell] Clipboard Watcher

Recently I needed to implement a clipboard watcher for PowerShell. This was actually not a simple thing. The only way to implement it as I found is to use P/Invoke + WinForms, which is very annoying. So firstly I implemented … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

PowerShell scripts and “Pattern Main”

Usually when I write PowerShell scripts I need to introduce a helper function Script.ps1 We want to extract a separate function As you we had to declare helper function before we can use it. And when we introduce more and … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

[PowerShell] Resolve-Path Safe!

PowerShell cmdlet Resolve-Path converts from relative path to the absolute However if we need to resolve path for non-existent file it fails The goal for this blogpost is to find a reliable way My first approach was But this is … Continue reading

Posted in Uncategorized | Tagged | 1 Comment

How to reach unreachable or copy files to RDP – Part 2

Part 1 When I tried to transfer 7mb of binary file using the approach from the part 1, it took so long, so I could not complete it. Then I had to switch to more efficient base64 conversion With that … Continue reading

Posted in Uncategorized | 3 Comments

Efficient Base64 conversion in PowerShell

In one of my previous blogpost I was converting binary files to/from base64 I used naive straightforward approach The problem with this approach is that if you need to convert big binary file, you have to read the whole file … Continue reading

Posted in Uncategorized | Tagged | 4 Comments