Skip to content

Commit 0f4e62e

Browse files
martinlingstuylmilanholemans
authored andcommitted
Updates the Using Guide with our definition of booleans. Closes pnp#3987
1 parent f06ffa8 commit 0f4e62e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/docs/user-guide/using-cli.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,38 @@ Commands in the CLI for Microsoft 365 often contain options that determine what
3535

3636
Some options are required and necessary for the particular command to execute, while other are optional. When listing available options for the particular command, CLI for Microsoft 365 follows the naming convention where required options are wrapped in angle brackets (`< >`) while optional options are wrapped in square brackets (`[ ]`). For example, in the `spo cdn origin add` command, the origin you want to add is required (`-r, --origin <origin>`), while the type of CDN for which this origin should be added is optional (`-t, --type [type]`) and its value defaults to `Public`.
3737

38+
## Boolean options (true/false)
39+
40+
Some options in the CLI expect boolean values like `true` or `false`. The CLI for Microsoft 365 has the following definition for booleans:
41+
42+
!!! info "Definition of Booleans"
43+
Booleans are case-insensitive and are represented by the following values.
44+
True: 1, yes, true, on
45+
False: 0, no, false, off
46+
47+
This means that whenever you need to pass a boolean value to a command, you can use any of the values listed above. For example, to configure if Planner is allowed in your organization you can execute the following:
48+
49+
```sh
50+
m365 planner tenant settings set --isPlannerAllowed true
51+
m365 planner tenant settings set --isPlannerAllowed 1
52+
m365 planner tenant settings set --isPlannerAllowed yes
53+
m365 planner tenant settings set --isPlannerAllowed on
54+
m365 planner tenant settings set --isPlannerAllowed TRUE
55+
56+
m365 planner tenant settings set --isPlannerAllowed false
57+
m365 planner tenant settings set --isPlannerAllowed 0
58+
m365 planner tenant settings set --isPlannerAllowed no
59+
m365 planner tenant settings set --isPlannerAllowed off
60+
m365 planner tenant settings set --isPlannerAllowed FALSE
61+
```
62+
63+
Additionally, in PowerShell you can use boolean values `$true` and `$false` as well:
64+
65+
```PowerShell
66+
m365 planner tenant settings set --isPlannerAllowed $true
67+
m365 planner tenant settings set --isPlannerAllowed $false
68+
```
69+
3870
## Values with quotes
3971

4072
In cases, when the option's value contains spaces, it should be wrapped in quotes. For example, to create a modern team site for the _CLI for Microsoft 365_ team, you would execute in the shell:

0 commit comments

Comments
 (0)