Skip to content

cli completion pwsh setup

Sets up command completion for PowerShell


cli completion pwsh setup [options]


Option Description
--help output usage information
-p, --profile <profile> Path to the PowerShell profile file
--query [query] JMESPath query string. See for more information and examples
-o, --output [output] Output type. json,text. Default text
--pretty Prettifies json output
--verbose Runs command with verbose logging
--debug Runs command with debug logging


This commands sets up command completion for the Office 365 CLI in PowerShell by registering a custom PowerShell argument completer in the specified profile. Because Office 365 CLI is not a native PowerShell module, it requires a custom completer to provide completion when used in non-immersive mode.

If the specified profile path doesn't exist, the CLI will try to create it.


Set up command completion for PowerShell using the profile from the profile variable

cli completion pwsh setup --profile $profile

More information