Skip to content

Running Powershell Script #456

Discussion options

You must be logged in to vote

you want sth like this

  - Name: pwsh example
    Command: powershell 
    ArgsLight: [C:\Users\User\AppData\Roaming\AutoDarkMode\test.ps1, -message 'Hello World!' -emotion 'happy']
    ArgsDark: [C:\Users\User\AppData\Roaming\AutoDarkMode\test.ps1, -message 'Hello World!' -emotion 'happy']
    AllowedSources: [Any]

You're basically calling powershell and then want to pass the script path as an argument, and your actual arguments as another argument

Powershell is quite finicky in terms of how it wants to be called.
ADM wraps all arguments, so with your script configuration example, you're calling
"powershell.exe" "-file" "C:\toggle-win-terminal-theme.ps1", """One Half Light"", """One Hal…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AndrewSmithDev
Comment options

@Spiritreader
Comment options

Answer selected by AndrewSmithDev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants