Category: powershell

[Programmer Tools] Powershell Modules

The list have been obtained with the help of VisualAPI, former BlocklyAutomation.
You can obtain a list on your device by running

dotnet tool update --global programmerall --no-cache

Then browse to http://localhost:37283/blocklyAutomation/automation/loadexample/powershellModules and press Execute
( You can have automation the same for your site – just contact me)

My powershell modules

  1. EPS:EPS


    EPS (Embedded Powe…

  2. FormatMarkdownTable:FormatMarkdownTable


    Format PowerShell object to Markdown table

  3. oh-my-posh:oh-my-posh


    A prompt theme engine for any shell

    Minimum Pow…

  4. posh-git:posh-git


    Provides prompt with Git status summary information and tab complet…

  5. PSReadLine:PSReadLine


    Great command line editing in the PowerShell console host

  6. Terminal-Icons:Terminal-Icons


    PowerShell module to add file icons to terminal based on fil…

  7. WinGet:WinGet


    Package Management (OneGet) provider that facilitates installing WinG…

[RO] Evaluare proprie la examenul de evaluare nationala, clasa a 9-a

Am copil / adolescent care a dat examenul de evaluare nationala – nu conteaza pe ce loc s-a clasat. Ideea este : in functie de rezultatele anterioare, unde are sanse la profilul pe care il vrea ? Excel ,Powershell si un pic de API/JSON din HTML rezolvat problema …

Mai intii, vedem pe ce loc s-a clasat ( sa zicem 1000 )

Luam rezultatele anterioare pe judet si le exportam in csv, ca sa le deschidem cu Excel :

$url= “″
$response = Invoke-WebRequest -Uri $url
$jsonObj = ConvertFrom-Json $([String]::new($response.Content))

$jsonObj | ConvertTo-Csv | Out-File C:\Temp\Rez2021.csv

Deschidem cu Excel (daca nu converteste bine, atunci Data => Text To Columns cu separator  ) si vazut ce medie are cel de pe locul

1000 ( sa zicem 9.5 )

Acum vedem cum s-au calificat la licee 

Alt json rezolva

$url  = “″
$response = Invoke-WebRequest -Uri $url
$jsonObj = ConvertFrom-Json $([String]::new($response.Content))

$jsonObj | ConvertTo-Csv | Out-File C:\Temp\Adm.csv

Acum mai trebuie un pivot dupa specializare si , pe values, Max(adm) si Min(Adm)  – optional filtru dupa liceu .


Windows terminal + Powershell to run IDE, Angular, .NET Core

I work at – and every time I need to run Angular , Visual Studio Code IDE and .NET Core run ( and Visual Studio  sometimes  – it is more web based)

Also, sometimes I need to run in a container – to install globally something that I do not want to have in my PC.

So  I have 1 windows terminal command to run those :

First one

wt new-tab   –title RootSource –suppressApplicationTitle -p “Windows PowerShell” -d . cmd /k “cd src && code . && powershell” ;split-pane  –title Angular –suppressApplicationTitle -V -p “Windows PowerShell” -d . cmd /k “cd src &&  npm run start –watch && powershell” ;split-pane  –title LocalAPI_NetCore –suppressApplicationTitle -V -p “Windows PowerShell” -d . cmd /k “cd src/Local/LocalAPI/LocalAPI && dotnet watch run”

As you see , I have

code .

to run VSCode,

npm run start –watch

to run Angular and

dotnet watch run

to run dotnet.

Second one:

wt new-tab -p “Windows PowerShell” -d . ;split-pane -p “Windows PowerShell” -d . cmd /k “cd src && devcontainer open .”

The second it just works with devcontainer  – if you are interested in sources, see 

With those, I can start my developer environment fast ( how fast, that depends on my PC)

Fun with Moniker- naming assembly versions

I liked the way docker generates names for every container instance – it was a funny way to differentiate them. I was thinking  – what about nuget packages – or any other release  ?

I have discovered Moniker – . Can be used as in docker – to generate different names at various runs. However, what I wanted is to make every release to have a funny name.

I have put in .NET Core local tools ( see  and the blog post ) and I have used from powershell ( see for the usage)

First, I have created a variable

if($result -eq 0){

$moniker = “$(dotnet moniker -s moby)-$dateToPrint”



$moniker = “$(dotnet moniker -s moniker)-$dateToPrint”


then used this variable in the release notes

$releaseNotes += (“;BuildNumber $env:BUILD_BUILDNUMBER with name “+ $moniker)

and in assembly title

dotnet-property “**/*.csproj” AssemblyTitle:”NetCoreBlockly $moniker”

Then, in C# , I write in the console:

static string nameBlockly()


var ass = Assembly.GetExecutingAssembly();

var assName = ass.GetName();

var nameBlockly = assName.Name;



var title = ass.GetCustomAttribute<AssemblyTitleAttribute>();

nameBlockly = title?.Title ?? nameBlockly;




//do nothing


return $”{nameBlockly} version:{assName.Version.ToString()}”;


If you want to see in action , you can:

  1. Look at the nuget release notes at ( see BuildNumber … with name
  2. See the change log – every release has the name
  3. Install NetCoreBlockly  and see the name 

See the tests in VSCode and improvements in powershell–part 24

I wanted that the user can see the tests when running in  VSCode. So in devcontainer.json I have put

“extensions”: [

and in the settings.json on .vscode folder


dotnet-test-explorer.enableTelemetry”: false,


So far, so good. But – I remember that powershell have a problem. And I figure why – before running

dotnet pwsh

I should run

dotnet tool restore

in order to run the dotnet-toolsjson from .config file



“version”: 1,

“isRoot”: true,

“tools”: {

“powershell”: {

“version”: “6.2.3”,

“commands”: [







.And this command should be executed both in Docker and in Azure


And one hour passes...
(This is the result of 1 hour per day auto-challenge as a full cycle developer for an exchange rates application)
( You can see the sources at )
2Reading NBR from internet
3Source control and build
4Badge and test
5CI and action
6Artifacts and dotnet try
7Docker with .NET Try
9Intermezzo - Various implementations for programmers
10Intermezzo - similar code - options
11Plugin implementation
12GUI for console
14Plugin in .NET Core 3
15Build and Versioning
16Add swagger
17Docker - first part
18Docker - second part
19Docker - build Azure
20Pipeline send to Docker Hub
21Play with Docker - online
22Run VSCode and Docker
23Deploy Azure
24VSCode see tests and powershell
25Code Coverage
26Database in Azure
27Sql In Memory or Azure
28Azure ConString, RSS
29Middleware for backward compatibility
30Identical Tables in EFCore
31Multiple Data in EFCore
32Dot net try again
33Start Azure Function
34Azure function - deploy
35Solving my problems
36IAsyncEnumerable transformed to IEnumerable and making Azure Functions works
37Azure functions - final
38Review of 37 hours
39Last Commit in AzureDevOps
40Create Angular WebSite
41Add static Angular to WebAPI .NET Core
42Docker for Angular
43Angular and CORS
44SSL , VSCode, Docker
45Routing in Angular
46RxJS for Routing
47RxJs Unsubscribe

Powershell vs console application

I have decided to make the utilities that I use in form of Powershell applications instead of Windows / Console applications


There are simpler to use  – just run the powershell

The parsing of command line is powerfull in powershell

There are simpler to maintain ( just text scripts files)

There are no big dependencies( .NET Core/ .NET 4.x  to be installed)

This is a good tool under  my toolbelt

Everything you do in .NET you can do in Powershell ( sometimes it is much harder in .NET rather then powershell)


The repository is and the first item is to move the big files from C: into another drive to free space by making a junction dir ( e.g. C:\ProgramData\Package Cache and C:\Windows\Installer )



I have become tired of reading about how to enable Wifi HotSpot in Windows 10 . The reference is here: . ( also, for bandwidth throttling you can try and / or   )

I was trying to make a Windows Store application – but, apparently, it is very difficult to run command lines application from Windows Store/

So I made a small powershell file ( hosted at )


Powershell and always use explicit


Let’s suppose you have a variable $x=”

In powershell the following are the same


Write-Host $x


I want to make a function that returns a value . Let’s say

Function Add([string] $a, [string]$b)


#debug to see arguments



return $a + $b



If I call this function with

Add 10 17 # the syntax for calling powershell is WITHOUT comma – the comma indicates arry

it shows




However , if I wrote

$x = Add 10 17

it does not wrote




Do you know why ?


Answer in the first comment

powershell and clean iis

Sometimes it is necessary to remove IIS temp files from windows directory

So I have made this following script in powershell

iis reset

What it does:
restarts iis ( run as admin in Windows 7)

Cleans temporary folders from

$windir + “\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files”

$windir + “\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files”

Enjoy !(iis reset)

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.