Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Last active May 14, 2022 02:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ferventcoder/5e075352e5d4436d3c87055f3810ec4f to your computer and use it in GitHub Desktop.
Save ferventcoder/5e075352e5d4436d3c87055f3810ec4f to your computer and use it in GitHub Desktop.
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$psFileFullPath = Join-Path $toolsDir "ps1crash.ps1"
Install-BinFile `
-Name ps1crash `
-Path "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe" `
-Command "-NoProfile -ExecutionPolicy unrestricted -Command `"&'$psFileFullPath' %*`""
@ferventcoder
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment