01 The Basics
Common Parameters
All Commands
These parameters work with all commands.
--json
Outputs the result in JSON.
Item Lists
For commands which return lists of items (users, computers, etc), you can use the following parameters:
-p <int>
Retrieve the specified page number of results. Pages are, by default, 15 items. The page number defaults to 1.
-s <int>
Set the page size. The number of pages will therefore bybe number of items / page . The default page size is 15.size.size
--search <terms>
Filter the list of items returned. The exact filtering methodology can vary by command, but typically all properties are searched.
--format <format string>
Format the output in a specific way. This exists to make it easier to pipe the output to another command. Using this will output only the resulting items, and none of the additional information you might otherwise see. The way to use this is:
--format "%{i} %{username} %{otherProperty}"
You can use %{i} to access the current row number. This will reset to 1 for each page.
Otherwise, you can use any of the properties defined on the objects being returned. In this case, username and otherProperty. Property names are not case sensitive.