ITADN
ExtremePro11299/PS2BAT-Interface
ExtremePro11299/PS2BAT-Interface · 文件
文件最后提交记录最后更新时间
README.md

PS2BAT-Interface

script
An interface for the PS2BAT module by EvilByteCode.

Requirements

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

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.