{"id":23421573,"url":"https://github.com/evilbytecode/ps2bat","last_synced_at":"2025-04-12T14:06:48.310Z","repository":{"id":218373194,"uuid":"746253273","full_name":"EvilBytecode/PS2BAT","owner":"EvilBytecode","description":"A Documentation for my module PS2BAT, it converts Powershell Scripts to Batchfile ones.","archived":false,"fork":false,"pushed_at":"2024-06-27T06:44:44.000Z","size":12,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T08:37:32.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvilBytecode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-21T14:28:45.000Z","updated_at":"2024-07-07T12:16:24.000Z","dependencies_parsed_at":"2024-06-27T07:50:38.187Z","dependency_job_id":"f6d3cf6f-496c-4e8c-b93b-c779a4cd560e","html_url":"https://github.com/EvilBytecode/PS2BAT","commit_stats":null,"previous_names":["evilbytecode/ps2bat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilBytecode%2FPS2BAT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilBytecode%2FPS2BAT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilBytecode%2FPS2BAT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvilBytecode%2FPS2BAT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvilBytecode","download_url":"https://codeload.github.com/EvilBytecode/PS2BAT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578864,"owners_count":21127713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T02:16:04.733Z","updated_at":"2025-04-12T14:06:48.290Z","avatar_url":"https://github.com/EvilBytecode.png","language":"PowerShell","readme":"PS2BAT Module Documentation\n===========================\n\u003ca href=\"https://t.me/pulzetools\"\u003e\u003cimg src=\"https://img.shields.io/badge/Join%20my%20Telegram%20group-2CA5E0?style=for-the-badge\u0026logo=telegram\u0026labelColor=db44ad\u0026color=5e2775\"\u003e\u003c/a\u003e\n\n- Powershell Into Batchfile!\n\nOverview\n--------\n\nThe 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.\n\n## Installing  Module:\n```powershell\nInstall-Module -Name PS2BAT\n```\n\u003e Make sure to run Powershell as administrator.\n\nIf you don't want to install the module, you can try the direct import method (See below).\n\nUsage\n-----\n\n### Standard Module Import:\n```powershell\nImport-Module -Name PS2BAT -Force\nConvert-PSToBAT -Path \"POWERSHELL_FILE_PATH\"\n```\n    \n\n*   **`-Path`:** Specifies the path to the PowerShell script file you want to convert.\n\n### Alternative Import Method (IF PROBLEMS):\n\u003e Only for Windows PowerShell. Not for PowerShell 7.\n```powershell\nImport-Module -Name 'C:\\Program Files\\WindowsPowerShell\\Modules\\PS2BAT\\1.0.0\\PS2BAT.psm1' -Force \nConvert-PSToBAT -Path \"PATH_TO_PS1_FILE\"\n```\n  \n### Direct Import Method:\n\u003e - Works with all versions of Powershell  \n\u003e - No need to install the module\n1. Make sure your [Execution Policy](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4) is compatible.\n2. Open PowerShell in the folder of the module.  \n3. Then execute this:\n```powershell\nImport-Module -Name .\\PS2BAT.psm1 \nConvert-PSToBAT -Path \"PATH_TO_PS1_FILE\"\n```    \n\nUsers 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.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilbytecode%2Fps2bat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilbytecode%2Fps2bat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilbytecode%2Fps2bat/lists"}