PS2BAT
A Documentation for my module PS2BAT, it converts Powershell Scripts to Batchfile ones.
Install / Use
/learn @KiExitDispatcher/PS2BATREADME
PS2BAT Module Documentation
<a href="https://t.me/pulzetools"><img src="https://img.shields.io/badge/Join%20my%20Telegram%20group-2CA5E0?style=for-the-badge&logo=telegram&labelColor=db44ad&color=5e2775"></a>
- Powershell Into Batchfile!
Overview
The PS2BAT module provides a cmdlet called Convert-PSToBAT, allowing users to convert PowerShell scripts (*.ps1 files) into batch files (*.bat files). This can be useful for scenarios where running PowerShell scripts might be restricted, and a batch file serves as a workaround.
Installing Module:
Install-Module -Name PS2BAT
Make sure to run Powershell as administrator.
If you don't want to install the module, you can try the direct import method (See below).
Usage
Standard Module Import:
Import-Module -Name PS2BAT -Force
Convert-PSToBAT -Path "POWERSHELL_FILE_PATH"
-Path: Specifies the path to the PowerShell script file you want to convert.
Alternative Import Method (IF PROBLEMS):
Only for Windows PowerShell. Not for PowerShell 7.
Import-Module -Name 'C:\Program Files\WindowsPowerShell\Modules\PS2BAT\1.0.0\PS2BAT.psm1' -Force
Convert-PSToBAT -Path "PATH_TO_PS1_FILE"
Direct Import Method:
- Works with all versions of Powershell
- No need to install the module
- Make sure your Execution Policy is compatible.
- Open PowerShell in the folder of the module.
- Then execute this:
Import-Module -Name .\PS2BAT.psm1
Convert-PSToBAT -Path "PATH_TO_PS1_FILE"
Users can use alternative import methods if they encounter issues with the standard module import. Make sure to provide the correct path to the PS2BAT.psm1 file and the PowerShell script file you want to convert.
License
This project is licensed under the MIT License. See the LICENSE file for details.
