Skip to content

episource/psbat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

psbat

This projects provides a template for wrapping powershell code within an cmd.exe batch file (*.bat). This is a self-contained & portable way to execute a powershell script by double clicking it in the windows shell. This works independently from powershell's execution policy which defaults to RESTRICED (deny any script file execution). See also about_Execution_Policies and Set-ExecutionPolicy.

Howto

Copy template.bat, then add your powershell code. Lines from @ECHO OFF to :POWERSHELL (inclusive) must be preserved. Custom powershell code goes below :POWERSHELL. Comments at the beginning of the file (lines starting with ::) may be removed.

About

Wrap powershell code into a cmd.exe batch file for easy execution, independent of current execution policy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published