Associate files with PowerShell Scripts
In this lecture, we look at how to create file associations with PowerShell Universal Desktop mode. We'll assign a script to the .ps2 file extension and run a script when the file is opened.
.ps2
FileAssociation.ps1
param($File) $Json = Get-Content $File | ConvertFrom-Json $Json
file.ps2
{ "Name": "Adam" }