Is this powershell code to install the linux sl command to PowerShell good? I have the following code in my project that installs linux sl on Windows using PowerShell. Is there anything you'd improve about this?

param([String]$Profile, [Switch]$Help, [Switch]$Force)

$ErrorMessages = @()

$Payload = "
# &lt;Code inserted by Install-Steam-Locomotive&gt;
function Steam-Locomotive {wsl sl -e}
function Steam-Locomotive-Force {wsl sl}
# &lt;/&gt;
"

$HelpText = "This script helps you use the tremendous `"sl`" program in Windows PowerShell.
Simply download the .ps1 file and execute it.
If the script finishes successfully, you can type Steam-Locomotive in PS to start the interruptable `"sl -e`".
Use Steam-Locomotive-Force to prevent interruption (`"sl`").
Example:
PS C:\Users\User\Downloads\&gt; .\Install-Steam-Locomotive.ps1 -Profile $PROFILE
"

if ($Help) {
  Write-Output $HelpText
  exit
}

if (!(Get-Command -Name "wsl" -CommandType "Application" -ErrorAction SilentlyContinue)) {
  $ErrorMessages += @("You don't have WSL installed. Cannot continue.")
}

if (!$Profile) {
  $ErrorMessages += @("Please supply your profile location under -Profile. Cannot continue.")
  if (Get-Content $Profile -ErrorAction SilentlyContinue | Select-String "Steam-Locomotive") {
    $ErrorMessages += @("Your profile seems to already contain something called `"Steam-Locomotive`". Use -Force to continue anyways.")
  }
}

if ((Get-Command -Name "Steam-Locomotive" -ErrorAction SilentlyContinue) -and !$Force) {
  $ErrorMessages += @("It seems a command named `"Steam-Locomotive`" is already installed. Use -Force to continue anyways.")
}

if ($ErrorMessages) {
  Write-Output $ErrorMessages
  exit
}

if (!(wsl command -v sl)) {
  Write-Output "First, install SL."
  wsl sudo apt install sl
}

if (wsl command -v sl) {
  Add-Content $Profile $Payload
  Write-Output "Done!"
}

if (!(wsl command -v sl)) {
  Write-Output "Failed installing wsl."
  exit
}

Write-Output "Success!"


EDIT: I had an error in this script. The fixed version is up on the project page.
Use the script template for documentation
Use a cmdlet binding for parameter
validation and help text
Personally, I run with $ErrorActionPreference = "Stop"