Create a link to a UWP app to run as administrator

I’m a console enthusiast. I used to work with cmder over the last years. In general I was pretty happy. But the announcement of the Windows Terminal really caught my attention.One thing that annoyed me is the disabled checkbox, when creating a link, that does not allow to have it automatically prompt for elevation.So here is my work around. Open windows explorer and enter shell:AppsFolder into the address bar to open the apps folder:Drag‘n’drop the Windows Terminal to any folder.Now patch the lnk-file: Create another lnk file pointing to cmd {path to the first lnk file}, running minimized and having a nice icon.Now just use the second lnk file and it works as expected.Windows Terminal, PowerShell 6 and oh-my-posh up and running.

Scheduled task to automatically delete Fiddler HTTPS interception certificates

I really like Fiddler, the web debugger. I like TLS. I develop software. Therefore I find the interception and decryption of secure traffic very useful.On the other hand I’m into security for a few years now and from that perspective it is a man in the middle attack. So you might want to allow this for the shortest period of time.Fiddler installs a Trusted Root Certificate and dynamically issues certificates for the requested targets for the requested host names. This messes up the certificate store and under certain circumstances leaves risk for potential abuse of these certificates – which are trusted on your machine.So let’s do some automation to clean up. First a few lines of PowerShell:And Finally a scheduled task to import that runs on log on:HTH

Junctions with PowerShell

Junctions are really useful. It pretty easy to create them inside a command shell on windows: But as it is a command inside cmd.exe and not a executable you cannot use mklink from PowerShell without calling cmd.exe BUT: the New-Item cmdlet supports options to achieve the same since Windows Management Framework v.5.

Updating the .NET target framework for many projects

I do component based development. Meaning I have 30+ repos, builds and each of them has 1-10 projects – The main library project, tests, samples and so on. The news about the support end for the .NET Framework 4, 4.5 and 4.5.1 was the motivation to update ALL of my projects. I know this is not neccessary because… .NET 4.5.2, 4.6 and 4.6.1 are compatible, in-place updates on top of .NET 4, .NET 4.5, and .NET 4.5.1. This means that applications built to target any of these previous .NET 4.x versions will continue running on .NET 4.5.2 without change. No recompiling of apps is necessary. ... but I wanted to update them from version 4 to since a long time now. To do the job I wrote a small powershell script. Beside the path command set-frameworkVersion there is CommitAndPush-GitRepositories which commits and pushes all repositories found underneath the path variable.

Enable or disable FxCop Code Analysis solution wide in Visual Studio Package Manager Console

I really like FxCop. But in a debugging session it can be useful to save time by temporarily disabling the code analysis. Sadly there is no *global switch* to turn it off and on again. So here is my approach: Create a new text file in the directory "C:\Users\{your user}\Documents\WindowsPowerShell" named "NuGet_profile.ps1" and add the following code: Restart Visual Studio. Click the menu "View" | "Other Windows" | "Package Manager Console". Now you can execute the following commands: > Enable-CodeAnalysis > Disable-CodeAnalysis