# File Associations

![File associations in the admin console. ](https://620394196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1JcgdTkn7CUOMdfsVjOO%2Fuploads%2FGbQZk07KeDNbKXBf3wiG%2Fimage.png?alt=media\&token=9bcf7bbd-7c82-4237-b061-f258ff6b8713)

## Define a File Association

File associations are stored within the `fileAssociations.ps1` file within the configuration directory. You can use the `New-PSUFileAssociation` cmdlet to define associations directly.&#x20;

By default, you'll need to include the script to run and the extension to associate with it.&#x20;

```powershell
New-PSUFileAssociation -Script FileAssociation.ps1 -Extension .ps3
```

## Accessing the File Path

By default, you can use the `$File` parameter within your script to access the full path to the file that caused the file association to trigger.

```powershell
param($File)

$Json = Get-Content $File | ConvertFrom-Json 
```
