PowerShell

@PowerShellMag

Adding centralized secrets service to Azure Service Fabric cluster

Adding secrets store and using store secrets in Azure Service Fabric
0
Azure Service Fabric is a great platform to host services for your distributed solution. It allows you to easily deploy and scale your applications and services. Apart from these out of the box functionalities which it is essentially build for, it also comes with secrets service which allows you to store and retrieve secret values for your application...read more

Customizing PowerShell terminal with oh-my-posh v3

Setting up oh-my-posh v3 custom theme for PowerShell
 
0
Last year I wrote an article on how to Customizing WSL2 on Windows with screenfetch and oh-my-zsh as I was spending a lot of time in WSL2 doing some heavy development for Linux platform using .NET Core. However recently I found myself working a lot in PowerShell prompt mainly with Git and really missed the customization I did for WSL, so I decided to customize my PowerShell console as well...read more

Setting Azure DevOps pipeline variable from PowerShell script

Output value from PowerShell script to Azure DevOps builds and releases
 
0
When using Azure DevOps Pipelines or Releases, it is pretty easy to move informations from the pipeline/release into the target artifact package or folder on the target environment. What can be tricky if you need to dictate your pipeline/release based on the value from your code base or maybe the environment to which you are deploying to. As a simple example I set the version attribute in in my .csproj file which I will use to tell UseDotNet task in my build pipeline which SDK to use to perform .NET Core project build. ...read more

Customizing WSL2 on Windows with screenfetch and oh-my-zsh

Setting up screenfetch and oh-my-zsh for use in WSL2 and Windows Terminal
0
Windows Subsystem for Linux or WSL i a great way to have a Linux environment easily accessible from your development environment on Windows. With latest Windows10 May 2020 update 2020H1 WSL got a major update WSL2 which enables even more fluent integration of Linux kernel into Windows10. I will assume that you are already using WSL2 and you are familiar with initial setup of it on Window10...read more

Generation Java client libraries for REST service with swagger-gen Azure DevOps

Compiling and serving MAVEN packages for Java with Azure DevOps using PowerShell
0
Generating client libraries for REST API which are documented with Swagger can significantly reduce product development time, especially on the front-end side. Well documented API can be easily interpreted by various tools to generate language specific libraries which can be then just easily integrated in in the API service consuming application. Some time ago I wrote an article Stop writing clients in C# for your Web APIs which explains how to use NSwag to generate NuGet packages for Swagger documented Web API REST services and to push them to Azure DevOps Artifact Feed...read more

Cloning Windows Virtual Machine in Azure without having to stop it

Zero downtime cloning of Virtual Machine in Azure using PowerShell
 
0
Creating a copy of an existing Virtual Machine on Azure is not really that much straight forward as you might think. The proper way as described in the documentation is to "generalize" Virtual Machine which puts it into a state where it can be used as a template for creating new Virtual Machines...read more

Install multiple packages from Visual Studio package manager console

Adding multiple nuget packages to the project from package manager console
0
If you are using Visual Studio 2017 as your main IDE, than you are probably familiar and used at least once NuGet package manager console. You may know or maybe not, but NuGet Package Manager relies on PowerShell script and Package Manager Console is basically hosted PowerShell command line inside Visual Studio. This means, apart from NuGet commands, you can also execute PowerShell commands. ...read more

Remote PowerShell Core session to a Linux host from Windows machine

Remote sessions using OpenSSH from Windows to Linux host
 
0
Starting from January 2018, Microsft has made PowerShell Core 6, a cross-platform tool available not only to Windows users which was the case so far with previous versions, but to Linux and Mac users as well. Since it was tool for Windows only, it had it's own ways for remoting using WinRM unlike Linux operating systems which primarily rely on SSH. Windows is great for editing and development, I find it really comfortable to work on with so many tools and platform available...read more

Setting IP address and domain filtering in IIS using PowerShell script

Restricting and allowing traffic to web application through IIS using PowerShell
0
Starting from IIS 7.0 Microsoft introduced IP and Domain restrictions feature as a part of IIS setup. However, if you do not have this feature installed on your IIS you can easily install it through windows features adding steps which are pretty much same for each Windows version (https://docs.microsoft.com/en-us/iis/configuration/system.webserver/security/ipsecurity/add) or simply by using WebPlatform Installer. Just run WebPlatform Installer and search for IP and Domain restrictions in search box...read more

Minify CSS and JavaScript files with PowerShell script

JavaScript and CSS file optimization with PowerShell script
 
0
Minification of Cascade Style Sheet (CSS) and Java Script (JS) should be on a TODO list for every web application. The minification of CSS and JS can be easily one on the runtime with ASP.NET bundling which is build in in ASP.NET framework, but in case of distributing your resource files over CDN you cannot use the runtime minification. You physical files need to be minified...read more

Merge folders with Windows PowerShell script

Detect changes and merge folders and files with PowerShell script
 
0
When deploying application to specific location it is often required to deploy only few files and not the whole deployment package. For example, if you changed only single static image file in your ASP.NET WebApplication, there is no reason to overwrite bin folder content and cause WebApplication on IIS to restart...read more

.NET

read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more