https://github.com/extremepro11299/ps2bat-interface
An interface for the PS2BAT module by EvilByteCode.
https://github.com/extremepro11299/ps2bat-interface
Last synced: 3 months ago
JSON representation
An interface for the PS2BAT module by EvilByteCode.
- Host: GitHub
- URL: https://github.com/extremepro11299/ps2bat-interface
- Owner: ExtremePro11299
- Created: 2024-01-30T19:52:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T19:03:09.000Z (almost 2 years ago)
- Last Synced: 2026-02-20T03:35:10.847Z (3 months ago)
- Language: Batchfile
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PS2BAT-Interface
[](https://github.com/ExtremePro11299/Powershell-networking-tool/actions?workflow=PSScriptAnalyzer)
An interface for the [PS2BAT module](https://github.com/EvilBytecode/PS2BAT) by EvilByteCode.
## Requirements
- Windows Vista or newer
- Compatible [execution policy](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4)
- [PS2BAT module](https://github.com/EvilBytecode/PS2BAT)
## Updates (newest to oldest)
- Added an option to change the execution policy from within the program
- Added cls to all areas
- You can now clear the powershell script entry after completing conversion
## Usage (view the command list for more details)
### 1) Connecting to the PS2BAT module
Type `module` on the main menu and you can provide the path to the PS2BAT module.
### 2) Selecting the Powershell script to convert
Type `select` on the main menu and you can provide the path to the Powershell script you want to convert.
### 3) Auto-connecting the PS2BAT module (optional)
Provide the path to the PS2BAT module in the DefaultModulePath.txt file and it will automatically choose it when you open the program.
> If the path is invalid, it will stay not_defined.
### 4) Changing the execution policy
Type `executionpolicy` on the main menu and you will be able to specify the execution policy you need.
> To change the execution policy for the LocalMachine, run the program as administrator.
### 5) Unblocking converter
Type `unblock` on the main menu and it will now work with the RemoteSigned execution policy.
> This feature does not work on Windows 7 and older.
### 6) Converting
Type `convert` on the main menu and it will convert the target Powershell script into a batch file.
### 7) Exiting
Type `exit` on the main menu or press Ctrl+C without selecting anything to exit the program (you can use the red X too)
## Errors
### Cannot run Convert.ps1 because running scripts is disabled on this system.
- Change the execution policy to either RemoteSigned or Bypass.
- Type `unblock` on the main menu.
### Module stays undefined after defining it in DefaultModulePath.txt
- Check if the path in DefaultModulePath.txt is valid.
### The term Unblock-file is not recognized as a name of a cmdlet
- Operating systems Windows 7 and older do not support this feature.
- Unblock Convert.ps1 through the properties menu.
## Command list
```txt
Commands
- cmds : Displays this page
- module : Provide the PS2BAT module
- select : Provide the script you want to convert
- executionpolicy : Change the execution policy
- convert : Converts the target powershell script into a batch file
- unblock : Unblocks Convert.ps1 using powershell Unblock-File.
- exit : Exits the program.
```