Skip to content

Instantly share code, notes, and snippets.

@d4rkeagle65
Created December 7, 2020 21:34
Show Gist options
  • Save d4rkeagle65/5b023a0a00c2d169d8cf1b0ef89edf92 to your computer and use it in GitHub Desktop.
Save d4rkeagle65/5b023a0a00c2d169d8cf1b0ef89edf92 to your computer and use it in GitHub Desktop.
Embedded PowerShell in Batch Script
@@echo off
@@findstr /v "^@@.*" "%~f0" > "%~f0.ps1" & powershell -ExecutionPolicy ByPass -File "%~f0.ps1" & del "%~f0.ps1" & exit
# Powershell Here #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment