id = "powershell" name = "PowerShell" homepage = "https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles" description = "A cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework." executables = ["pwsh", "powershell"] [dotfiles] # The official about_Profiles documentation lists the current-user profiles: # $HOME/.config/powershell/profile.ps1 and # $HOME/.config/powershell/Microsoft.PowerShell_profile.ps1 on macOS/Linux, # and $HOME/Documents/PowerShell/profile.ps1 and # $HOME/Documents/PowerShell/Microsoft.PowerShell_profile.ps1 on Windows. paths = [ "~/.config/powershell/", "~/Documents/PowerShell/", ] secret = [] [commands] format = 1 label = "Start PowerShell" description = "Start pwsh with common startup switches or run a script file or a command string. Remoting, encoded commands and apartment switches are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false } [[commands.source]] id = "help" kind = "help" revision = "pwsh -h (PowerShell 7)" evidence = """ -File | -f -Command | -c -NoExit | -noe -NoLogo | -nol -NonInteractive | -noni -NoProfile | -nop -WorkingDirectory | -wd -ExecutionPolicy | -ex | -ep -OutputFormat | -o | -of Valid values are "Text" (text strings) or "XML" (serialized CLIXML format). -Version | -v -WindowStyle | -w Valid values are Normal, Minimized, Maximized, and Hidden. """ [[commands.field]] id = "no_profile" label = "Skip profiles" description = "Do not load the PowerShell profiles." type = "boolean" option = ["-NoProfile"] sources = ["help"] [[commands.field]] id = "no_logo" label = "Hide banner" type = "boolean" option = ["-NoLogo"] sources = ["help"] [[commands.field]] id = "no_exit" label = "Stay open after running" type = "boolean" option = ["-NoExit"] sources = ["help"] [[commands.field]] id = "non_interactive" label = "Non-interactive" description = "Fail instead of prompting for input." type = "boolean" option = ["-NonInteractive"] sources = ["help"] [[commands.field]] id = "working_directory" label = "Working directory" type = "path" option = ["-WorkingDirectory"] path = { kind = "directory", role = "input" } sources = ["help"] [[commands.field]] id = "output_format" label = "Output format" type = "enum" option = ["-OutputFormat"] choices = [{ value = "Text", label = "Text" }, { value = "XML", label = "XML (CLIXML)" }] sources = ["help"] [[commands.field]] id = "command" label = "Command" description = "PowerShell command text to run. Must be last on the command line." type = "string" option = ["-Command"] effect = "exec" sources = ["help"] [[commands.field]] id = "file" label = "Script file" description = "Script to run. Must be last on the command line." type = "path" option = ["-File"] path = { kind = "file", role = "input" } effect = "exec" sources = ["help"] [[commands.task]] id = "clean-session" label = "Clean interactive session" set = { no_profile = [true], no_logo = [true] } fields = ["no_profile", "no_logo", "working_directory"] [[commands.task]] id = "run-command" label = "Run a command" fields = ["no_profile", "non_interactive", "no_exit", "command"] required = ["command"] [[commands.task]] id = "run-script" label = "Run a script file" fields = ["no_profile", "non_interactive", "file"] required = ["file"] [[commands.group]] id = "basic" label = "Basic" fields = ["command", "file", "no_profile", "no_logo", "no_exit"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["non_interactive", "working_directory", "output_format"]