Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add Support for PowerShell Scripts #195

Open
izzalDev opened this issue Jan 25, 2025 · 1 comment
Open

[FEATURE] Add Support for PowerShell Scripts #195

izzalDev opened this issue Jan 25, 2025 · 1 comment

Comments

@izzalDev
Copy link


Is your feature request related to a problem? Please describe.
I'm always frustrated when working in environments where PowerShell is the preferred shell, but only batch files (.bat) are supported for automation. This limits flexibility, readability, and access to advanced scripting features provided by PowerShell, such as robust error handling and object manipulation.


Describe the solution you'd like
I would like the system to fully support PowerShell scripts (.ps1) as an alternative to batch files. This includes:

  • Allowing PowerShell scripts to replace or supplement existing batch files.
  • Ensuring that scripts are executed correctly with any required permissions or prerequisites (e.g., setting the execution policy).
  • Providing documentation or examples for users to transition or start using PowerShell for automation tasks.

Describe alternatives you've considered

  • Converting batch scripts to PowerShell manually for internal use, but this approach is cumbersome and lacks official support.
  • Using third-party tools to invoke PowerShell scripts from batch files, which introduces unnecessary complexity.

Additional context
PowerShell provides modern scripting capabilities and is cross-platform, making it a better long-term solution compared to batch scripts. Supporting PowerShell will benefit users who rely on advanced scripting for tasks, especially in environments where Windows or cross-platform compatibility is essential.

@FaceFTW
Copy link

FaceFTW commented Jan 31, 2025

As someone who is going to try out dotter, one way I'm thinking around this limitation is to either just invoke pwsh.exe/powershell.exe with the -File argument or just have the entire batch file just be pwsh.exe -Command {/*powershell code here*/}

This is by no means discouraging first-class support for PowerShell on Windows. I might work on this feature depending on how painful I find the workaround to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants