An golden oldie – RunAsEx

They say statistics never lie. Until last year when I brought the download down, some 25.000 downloads had been recorded for the RunAsEx utility I had written. I also get a couple of emails every month asking me to release the RunAsEx source or binary. I have for a long time refused as I do not think it adheres to any good security practices. However I do recognize that sometimes you need a quick and easy replacement that does that little extra thing. So once again it is now online for download, and this time I have released the source also! The tool was originally published back in 2011 and the code is basically the same today but I had to re-sign it with my new code signing certificate as it was signed with an very old key. Uses .NET 2.0 framework. Enjoy!

Read more about Sorlov.UserExec (RunAsEx)

Sorlov.PowerShell rebranding and re-launch

Today I have the pleasure of releasing Generation 5 of my library Sorlov.Powershell, now rebranded to SPEL (Sorlov Powershell Extension Library). Many internal components have been revamped. Integration and need for third party components have all but some been removed and the library now do not contain functionality found in stock PowerShell as the PowerShell evolution have been moving forward.

The major functionality is still self-hosted PowerShell exe-files, services, and not to mention the support for HTA-based PowerShell scripts.

This new version also breaks updating since a new model is in place; it still supports the same configuration files but you need to manually remove the old
version to install the new version (ie delete all binaries under \WindowsPowerShell\Modules\Sorlov.PowerShell or where you have installed it) and then run the installer.

Read more and download from the SPEL information page.

Holliday fun

This is a very silly and stupid demo of the Import-HTML and Out-Word Cmdlets that are both parts of the PowerShell library I publish. I was inspired to this module (apk.psm1) by fellow MVP Niklas Goude who once made a script to pull these values down with PowerShell. However I needed very fast parsing of HTML to XML and the Internet Explorer parser is simply to slow for me and so I wrote the Import-HTML wrapper around some code from the HtmlAgilityPack.

So what do the script do you wonder? Well The script will go to APK.NU (Alcohol Per Krona Index) and get the list of the best prices for alcohol in the Swedish monopoly (this is the childish part of the script) as HTML. Take it for what it is: a demo of parsing HTML and I needed some arbitary data to parse.. =) After download completes then it parses the document to xml then we are able to use those values to create a nice pdf or whatelse we need.

1249 registered users!!

Today I got my 1249:th registration email for Sorlov.PowerShell library! I get about 2-3 email daily with suggestions and questions about future versions! I love it – keep it comming! And I’m wondering who will be number 1250…

To celebrate this I updated some code in the Experimental DLL. I implemented a simple wrapper on top of HtmlAgilityPack (integrated) that will allow you to pull any HTML file and convert into XML. Why is this a good idea? Well if you wan’t to quickly access/scrape a site (I assume within the legal limits) and don’t wan’t to use the ParsedHTML (slooooow) property of a fetched HTML document. This approach is very simple and very effective! The new command is Import-HTML and accepts a local file or a remote http path as argument and you will get a xml-structure back to work with!

Using PowerShell as default Win+X shell in Windows 8.1

I don’t even know why anyone would use Command Promt (cmd.exe) anymore as the default commandline Shell on the Win+X menu: However in Windows 8.1 the default commandline shell when you right-click in the bottom left corner, or hit Win+X, is just that..

But there is a easy fix: Right-click on the taskbar and select Properties in the context menu, then select the Navigation tab. Select to replace Command Prompt with PowerShell. Save and enjoy!


Thank you DigiCert!

Thanks to my good friends over at DigiCert I will change the certificate signing my PowerShell Library (and other binary code) with the next release of the files. So do not be alarmed if you notice the signer changing. They will now be signed by my very own Code Signing Certificate with the CN=”Daniel Sörlöv” courtesy of

Not so unexpected update…

As I released the possibility to run HTA-type applications with Invoke-HTApp yesterday you might have guessed that I would release a New-SelfHostedHTApp? Well, I did. The self-hosted HTApps can run without any of my own libraries (just as the self-hosted ps1 files you can produce with New-SelfHostedPS) as EXE, signed or not… a new video of all the self-hosting options I have will be released within a couple of days at youtube.. but while you wait download the lib and make your own self-hosted HTApp…