
Image from Pexels
Tagged articles - PowerShell
Found 25 articles tagged with PowerShell
01
Nov
2021
Adding centralized secrets service to Azure Service Fabric cluster
PowerShell24 titlesAdding 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
06
Jun
2021
Customizing PowerShell terminal with oh-my-posh v3
PowerShell24 titlesSetting 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
01
Feb
2021
Setting Azure DevOps pipeline variable from PowerShell script
PowerShell24 titlesOutput 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
02
Sep
2019
Cloning Windows Virtual Machine in Azure without having to stop it
PowerShell24 titlesZero 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
22
Nov
2018
Install multiple packages from Visual Studio package manager console
PowerShell24 titlesAdding 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
18
Jun
2018
Remote PowerShell Core session to a Linux host from Windows machine
PowerShell24 titlesRemote 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
13
Jun
2018
Use different configuration based on environment value in ASP.NET Core
.NET229 titlesDifferent configuration per environment in ASP.NET Core
0
In .NET framework, having separate configuration is possible by having different web.config or app.config file transformations since in .NET framework configuration is stored in XML format. You can check more on this in article Separate configuration files per build config in Visual Studio IDE...read more
18
May
2018
Seeding data in Entity Framework Core from Visual Studio
.NET229 titlesInsert sample data from Visual Studio IDE with EF core
0
Unlike Entity Framework 6, EF Core and whole .NET Core relies on dependency injection. For example, configuration is expected to be injected from the calling assembly instead of being available at any time...read more
17
Mar
2018
Setting IP address and domain filtering in IIS using PowerShell script
PowerShell24 titlesRestricting 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
06
Mar
2018
Converting existing website images to Google WebP using PowerShell
PowerShell24 titlesEncoding existing image files to Google WebP format
0
WebP is an image format introduced by Google in 2010. It uses specific technique to compress image and reduce size significantly while not changing the image quality on the larger scale...read more
06
Mar
2018
Optimize JPG images for internet using jpegtran and PowerShell
PowerShell24 titlesReduce size of existing JPG images without loosing quality with jpegtran
0
Recently I wrote an article about optimizing PNG images for intenrent using pngcrush and PowerShell. I actually used this method to optimize all PNG images on my website...read more
05
Mar
2018
Optimize PNG images for internet using pngcrush and PowerShell
PowerShell24 titlesReduce size of existing PNG images without loosing quality with pngcrush
0
Imagine a case where you have an existing website which is running for the past few years. You decided to run a Google PageSpeed insights on couple of pages and you realized that your PNG images on the pages are not optimized for Internet...read more
04
Mar
2018
Minify CSS and JavaScript files with PowerShell script
PowerShell24 titlesJavaScript 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
22
Feb
2018
Merge folders with Windows PowerShell script
PowerShell24 titlesDetect 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
18
Feb
2018
Sending email with Gmail account using PowerShell script
PowerShell24 titlesSend email with your Gmail account login with PowerShell script
0
Sending email after and even before a long running PowerShell script is a logical thing to do to notify users which are responsible for taking actions for the specific operation. PowerShell starting from version 3.0 has build in cmdlet Send-MailMessage for sending emails.
...read more
.NET
5
Jun
2022
Using dotnet nuget package vulnerability scan in Azure DevOps build
Listing nuget vulnerabilities and controlling build in Azure DevOps
5
May
2022
Protecting static files in ASP.NET Core using custom middleware
Restricting access to specific static content with middleware in ASP.NET Core
20
Dec
2021
Supporting multiple authentication schemes in asp.net core webapi
Using more than one authentication schemes in webapi projects
12
Dec
2021
Controlling the flow of migrations in EF Core
Altering EF Core migrations execution order
28
Nov
2021
Unit of work pattern with Dapper
Implementing unit of work pattern with Dapper in .NET 5
21
Sep
2021
Adding display name to Enum values
Implementing additional values for Enum items in C#
JavaScript
28
Oct
2018
HTML5 localStorage with expiry with vanilla JavaScript
Using HTML5 localStorage with expiry
8
May
2018
Monitoring DOM changes with JavaScript
Handling DOM changes with plain JavaScript
9
May
2017
Non blocking CSS load on the page
Load external CSS files in an async manner
16
Mar
2017
Serialize html form to JSON without using JQuery
Transform user input from HTML form fields to JSON
17
Jan
2016
Copy text value to clipboard using jQuery
Simple sample of using jQuery to copy value to clipboard
11
Jan
2016
Resize image on the client side with JQuery
Reducing the upload sie by resizing image on the client side
SQL/T-SQL
22
Feb
2022
Select column names with values from SQL Server database
Fetching column names with its value in T-SQL using built in JSON methods
23
May
2020
Identifying opened connections for the specific application in SQL Server
Connection listing queries in SQL Server
3
May
2018
Reading JSON data in T-SQL on SQL Server
Extracting values from JSON string on SQL Server using T-SQL
28
Apr
2016
Create XML/HTML with T-SQL
Generating XML/HTML output in SQL Server
24
Nov
2015
IP address to octets split in TSQL
Split IP addresse into octets in SQL Server
20
Jul
2015
Getting first and last second of the current year, month and day
Using minimum and maximum date time in SQL query
Umbraco CMS
2
Mar
2018
Minify HTML output of your pages
Minification of HTML output using ASP.NET IHttpModule
18
Apr
2015
Generate sitemap.xml on the fly in Umbraco CMS
Simple sitemap.xml Umbraco handler
2
Mar
2015
Accessing UmbracoHelper in HttpHandler request
Working with UmbracoHelper and IPublishedContent in HttpHandler
14
Sep
2014
Same page language switching in Umbraco
Land on the same page in different language in Umbraco using Relations
4
Sep
2014
Getting cropped image the smart way
The way to get cropped image URL with option to load original image too
27
Aug
2014
Fastest way to return JSON result from a controller
Resturn JSON in MVC controller action