Getting Started
What is PowerShell Universal?
Installation
Windows
IIS
Persistent Docker Image
Configuration
Port and HTTPS Certificate
SQL Persistence
Platform
Environments
Variables
Published Folders
Git
Repository
Modules
Secret Management
APIs
Basics
Security
Event Hubs
Automation
Scripts
Scheduling
Triggers
Apps
Basics
Dynamic Regions
Session and Cache
Forms
Navigation
Basic Tables
Designer
Theming
Pages
Forms
Desktop
About
File Associations
Security
Forms
Azure Active Directory and OpenID Connect
Roles
App Tokens
Development
Debugger
Visual Studio Code Extension
PowerShell Module and Management API
File Associations
Associate files with PowerShell Scripts
Download this Lecture DocsIn 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.
Example Code from this lecture
FileAssociation.ps1
param($File)
$Json = Get-Content $File | ConvertFrom-Json
$Json
file.ps2
{
"Name": "Adam"
}