uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
“uip 或用户”的语法和选项,用于管理 Orchestrator 租户用户及其文件夹和角色分配。
uip or users在租户级别管理 Orchestrator 用户 - 列出、创建、编辑和删除用户,以及将用户分配到文件夹和管理租户级别的角色分配。有关文件夹级别的角色管理,请参阅uip or roles 。
大纲
uip or users <verb> [options]
uip or users <verb> [options]
动词
| 动词 | 用途 |
|---|---|
list | 带有可选筛选器的租户用户列表。 |
list-in-folder | 列出分配到文件夹的用户及其文件夹级别角色。 |
list-available | 列出仍可分配至文件夹(尚未分配)的用户。 |
get | 通过密钥获取一个用户。 |
create | 创建新用户;可选择分配租户角色并设置 Unattended 执行凭据。 |
delete | 通过密钥删除用户。 |
assign | 将用户分配到文件夹,并可以选择使用文件夹级别角色。 |
unassign | 从文件夹中删除用户。 |
edit | 编辑用户属性(PATCH 语义)。 |
current | 返回当前经过身份验证的用户的详细信息。 |
assign-roles | 替换用户的租户级别角色分配。 |
uip 或用户列表
列出租户中的用户。返回用户密钥 (GUID)、用户名、全名、电子邮件、类型和活动状态。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --key | GUID | — | 按用户密钥筛选(精确匹配)。 |
| — | --username | text | — | 按用户名筛选(包含匹配项)。 |
| — | --email | text | — | 按电子邮件地址筛选(包含匹配项)。 |
-l | --limit | 数字 | 50 | 页面大小。 |
| — | --offset | 数字 | 0 | 跳过计数。 |
| — | --order-by | 字段 | — | OData 排序(例如, UserName asc )。 |
| — | --all-fields | 标记 | 关闭 | 返回完整的 API 有效负载。 |
示例
uip or users list --limit 10
uip or users list --username admin
uip or users list --output-filter 'Data[].{key:Key, name:UserName}'
uip or users list --limit 10
uip or users list --username admin
uip or users list --output-filter 'Data[].{key:Key, name:UserName}'
数据形状(--输出 json)
{
"Code": "UserList",
"Data": [
{
"Key": "d4e5f6a7-0000-0000-0000-000000000001",
"UserName": "admin@example.com",
"FullName": "Admin User",
"Email": "admin@example.com",
"Type": "User",
"IsActive": true
}
],
"Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "HasMore": false }
}
{
"Code": "UserList",
"Data": [
{
"Key": "d4e5f6a7-0000-0000-0000-000000000001",
"UserName": "admin@example.com",
"FullName": "Admin User",
"Email": "admin@example.com",
"Type": "User",
"IsActive": true
}
],
"Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "HasMore": false }
}
uip 或文件夹中的用户列表
列出分配到文件夹的用户及其文件夹级别角色。需要--folder-path或--folder-key 。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
| — | --folder-path | 路径 | — | 目标文件夹。提供此项或--folder-key 。 |
| — | --folder-key | GUID | — | 目标文件夹。提供此项或--folder-path 。 |
| — | --include-inherited | 标记 | 关闭 | 同时显示从父文件夹继承的用户。 |
-l | --limit | 数字 | 50 | 页面大小。 |
| — | --offset | 数字 | 0 | 跳过计数。 |
| — | --order-by | 字段 | Id desc | OData 排序。 |
示例
uip or users list-in-folder --folder-path "Shared"
uip or users list-in-folder --folder-path "Shared" --include-inherited
uip or users list-in-folder --folder-path "Shared" \
--output-filter 'Data[].{name:UserName, roles:Roles}'
uip or users list-in-folder --folder-path "Shared"
uip or users list-in-folder --folder-path "Shared" --include-inherited
uip or users list-in-folder --folder-path "Shared" \
--output-filter 'Data[].{name:UserName, roles:Roles}'
数据形状(--输出 json)
{
"Code": "UserList",
"Data": [
{
"Key": "d4e5f6a7-0000-0000-0000-000000000001",
"UserName": "admin@example.com",
"FullName": "Admin User",
"Type": "User",
"IsInherited": false,
"Roles": "Folder Administrator"
}
]
}
{
"Code": "UserList",
"Data": [
{
"Key": "d4e5f6a7-0000-0000-0000-000000000001",
"UserName": "admin@example.com",
"FullName": "Admin User",
"Type": "User",
"IsInherited": false,
"Roles": "Folder Administrator"
}
]
}
uip 或用户列表-可用
列出仍可分配给文件夹的租户用户。将返回的键与users assign或roles assign一起使用。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
| — | --folder-path | 路径 | — | 目标文件夹。提供此项或--folder-key 。 |
| — | --folder-key | GUID | — | 目标文件夹。提供此项或--folder-path 。 |
-s | --search | text | — | 按用户名筛选(包含匹配项)。 |
-l | --limit | 数字 | 50 | 页面大小。 |
| — | --offset | 数字 | 0 | 跳过计数。 |
示例
uip or users list-available --folder-path "Shared"
uip or users list-available --folder-path "Shared" --search admin
uip or users list-available --folder-path "Shared" \
--output-filter 'Data[].Key'
uip or users list-available --folder-path "Shared"
uip or users list-available --folder-path "Shared" --search admin
uip or users list-available --folder-path "Shared" \
--output-filter 'Data[].Key'
数据形状(--输出 json)
{
"Code": "UserAvailableList",
"Data": [
{
"Key": "d4e5f6a7-0000-0000-0000-000000000003",
"UserName": "newuser@example.com",
"Roles": ""
}
]
}
{
"Code": "UserAvailableList",
"Data": [
{
"Key": "d4e5f6a7-0000-0000-0000-000000000003",
"UserName": "newuser@example.com",
"Roles": ""
}
]
}
uip 或用户获取
按 GUID 密钥获取用户。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<user-key> | 是 | 用户密钥 (GUID)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
| — | --all-fields | 标记 | 关闭 | 返回完整的 API 有效负载。 |
示例
uip or users get d4e5f6a7-0000-0000-0000-000000000001
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --all-fields
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --output-filter 'Data.Email'
uip or users get d4e5f6a7-0000-0000-0000-000000000001
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --all-fields
uip or users get d4e5f6a7-0000-0000-0000-000000000001 --output-filter 'Data.Email'
数据形状(--输出 json)
{
"Code": "User",
"Data": {
"Key": "d4e5f6a7-0000-0000-0000-000000000001",
"UserName": "admin@example.com",
"FullName": "Admin User",
"Email": "admin@example.com",
"Type": "User",
"IsActive": true
}
}
{
"Code": "User",
"Data": {
"Key": "d4e5f6a7-0000-0000-0000-000000000001",
"UserName": "admin@example.com",
"FullName": "Admin User",
"Email": "admin@example.com",
"Type": "User",
"IsActive": true
}
}
UIP 或用户创建
新建租户用户。只需要--username 。该 API 需要rolesList ,因此在实践中实际上需要--role-keys — 请将其与租户作用域角色 GUID 一起使用。
选项
身份
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --username | text | 必填 | 登录用户名。 |
| — | --name | text | — | 名字。 |
| — | --surname | text | — | 姓氏。 |
| — | --email | text | — | 电子邮件地址。 |
| — | --type | 枚举 | — | 用户类型(例如User 、 DirectoryUser )。 |
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
角色和许可证
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --role-keys | CSV 格式的 GUID | — | 租户范围的角色 GUID(解析为 API 有效负载的角色名称)。 |
| — | --license-type | 枚举 | — | 例如, Attended 、 Unattended 、 StudioPro 。 |
会话权限(标志对)
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --allow-unattended / --deny-unattended | 标记 | — | 允许或拒绝执行 Unattended 作业。 |
| — | --allow-attended / --deny-attended | 标记 | — | 允许或拒绝 Attended 会话。 |
| — | --allow-login / --deny-login | 标记 | — | 允许或拒绝 Orchestrator 登录。 |
| — | --allow-personal-workspace / --deny-personal-workspace | 标记 | — | 允许或拒绝个人工作区。 |
| — | --active / --inactive | 标记 | — | 激活或停用用户。 |
Unattended 执行凭据
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --unattended-username | text | — | Windows 帐户(例如DOMAIN\user )。 |
| — | --unattended-password | text | — | “密码”或“外部密码引用名称”(对于只读凭据存储)。 |
| — | --credential-store-key | GUID | — | 凭据存储。使用credential-stores list进行查找。 |
| — | --credential-type | 枚举 | — | Default 或 SmartCard。 |
| — | --limit-concurrent / --no-limit-concurrent | 标记 | — | 允许或禁止在多台计算机上并发执行。 |
示例
uip or users create --username newuser@example.com --email newuser@example.com \
--role-keys a1b2c3d4-0000-0000-0000-000000000001
uip or users create --username bot@example.com --name Bot --surname Worker \
--role-keys a1b2c3d4-0000-0000-0000-000000000002 \
--unattended-username DOMAIN\\bot --unattended-password s3cret
uip or users create --username newuser@example.com \
--role-keys a1b2c3d4-0000-0000-0000-000000000001 \
--output-filter 'Data.Key'
uip or users create --username newuser@example.com --email newuser@example.com \
--role-keys a1b2c3d4-0000-0000-0000-000000000001
uip or users create --username bot@example.com --name Bot --surname Worker \
--role-keys a1b2c3d4-0000-0000-0000-000000000002 \
--unattended-username DOMAIN\\bot --unattended-password s3cret
uip or users create --username newuser@example.com \
--role-keys a1b2c3d4-0000-0000-0000-000000000001 \
--output-filter 'Data.Key'
数据形状(--输出 json)
{
"Code": "User",
"Data": {
"Key": "d4e5f6a7-0000-0000-0000-000000000010",
"UserName": "newuser@example.com",
"FullName": "",
"Email": "newuser@example.com",
"Type": "User",
"IsActive": true
}
}
{
"Code": "User",
"Data": {
"Key": "d4e5f6a7-0000-0000-0000-000000000010",
"UserName": "newuser@example.com",
"FullName": "",
"Email": "newuser@example.com",
"Type": "User",
"IsActive": true
}
}
UIP 或用户删除
从租户中永久删除用户。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<user-key> | 是 | 用户密钥 (GUID)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip or users delete d4e5f6a7-0000-0000-0000-000000000010
uip or users delete d4e5f6a7-0000-0000-0000-000000000010 --output-filter 'Data.Status'
uip or users delete d4e5f6a7-0000-0000-0000-000000000010 --output plain
uip or users delete d4e5f6a7-0000-0000-0000-000000000010
uip or users delete d4e5f6a7-0000-0000-0000-000000000010 --output-filter 'Data.Status'
uip or users delete d4e5f6a7-0000-0000-0000-000000000010 --output plain
数据形状(--输出 json)
{
"Code": "UserDeleted",
"Data": { "Key": "d4e5f6a7-0000-0000-0000-000000000010", "Status": "Deleted successfully" }
}
{
"Code": "UserDeleted",
"Data": { "Key": "d4e5f6a7-0000-0000-0000-000000000010", "Status": "Deleted successfully" }
}
UIP 或用户分配
将用户分配到文件夹,并可以选择使用文件夹级别角色。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --user-key | GUID | 必填 | 用户密钥。 |
| — | --role-keys | CSV 格式的 GUID | — | 文件夹范围角色 GUID。 |
| — | --folder-path | 路径 | — | 目标文件夹。提供此项或--folder-key 。 |
| — | --folder-key | GUID | — | 目标文件夹。 |
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared"
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared" \
--role-keys a1b2c3d4-0000-0000-0000-000000000002
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared" --output-filter 'Data.Status'
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared"
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared" \
--role-keys a1b2c3d4-0000-0000-0000-000000000002
uip or users assign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared" --output-filter 'Data.Status'
数据形状(--输出 json)
{
"Code": "UserAssigned",
"Data": {
"UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
"FolderPath": "Shared",
"Status": "Assigned successfully"
}
}
{
"Code": "UserAssigned",
"Data": {
"UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
"FolderPath": "Shared",
"Status": "Assigned successfully"
}
}
uip 或用户取消分配
从文件夹中删除用户。用户不会被删除。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --user-key | GUID | 必填 | 用户密钥。 |
| — | --folder-path | 路径 | — | 要从中删除的文件夹。提供此项或--folder-key 。 |
| — | --folder-key | GUID | — | 要从中删除的文件夹。 |
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared"
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-key b1c2d3e4-0000-0000-0000-000000000001
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared" --output-filter 'Data.Status'
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared"
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-key b1c2d3e4-0000-0000-0000-000000000001
uip or users unassign --user-key d4e5f6a7-0000-0000-0000-000000000001 \
--folder-path "Shared" --output-filter 'Data.Status'
数据形状(--输出 json)
{
"Code": "UserUnassigned",
"Data": {
"UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
"FolderPath": "Shared",
"Status": "Unassigned successfully"
}
}
{
"Code": "UserUnassigned",
"Data": {
"UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
"FolderPath": "Shared",
"Status": "Unassigned successfully"
}
}
uip 或用户编辑
通过密钥编辑用户。读取当前值,合并提供的字段,然后保存。至少提供一个更新选项。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<user-key> | 是 | 用户密钥 (GUID)。 |
选项
与users create相同的标志,但--username (无法更改)和--role-keys (改为使用users assign-roles )除外。所有会话权限标志对、许可证类型和 Unattended 凭据选项都适用。
示例
uip or users edit d4e5f6a7-0000-0000-0000-000000000001 --email newmail@example.com
uip or users edit d4e5f6a7-0000-0000-0000-000000000001 \
--allow-unattended --license-type Unattended
uip or users edit d4e5f6a7-0000-0000-0000-000000000001 --inactive \
--output-filter 'Data.Status'
uip or users edit d4e5f6a7-0000-0000-0000-000000000001 --email newmail@example.com
uip or users edit d4e5f6a7-0000-0000-0000-000000000001 \
--allow-unattended --license-type Unattended
uip or users edit d4e5f6a7-0000-0000-0000-000000000001 --inactive \
--output-filter 'Data.Status'
数据形状(--输出 json)
{
"Code": "UserUpdated",
"Data": { "Key": "d4e5f6a7-0000-0000-0000-000000000001", "Status": "Updated successfully" }
}
{
"Code": "UserUpdated",
"Data": { "Key": "d4e5f6a7-0000-0000-0000-000000000001", "Status": "Updated successfully" }
}
uip 或用户当前值
返回当前经过身份验证的用户。用于验证会话和发现自己的用户密钥。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip or users current
uip or users current --output-filter 'Data.Key'
uip or users current --output table
uip or users current
uip or users current --output-filter 'Data.Key'
uip or users current --output table
数据形状(--输出 json)
与User形状相同的users get 。
uip 或用户分配角色
将租户级别角色分配给用户。这将替换用户当前的租户角色 — 使用roles set-role-users作为角色级别的附加成员身份。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<user-key> | 是 | 用户密钥 (GUID)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
| — | --role-keys | CSV 格式的 GUID | 必填 | 要在租户作用域内分配的角色 GUID。 |
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
--role-keys a1b2c3d4-0000-0000-0000-000000000001
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
--role-keys a1b2c3d4-0000-0000-0000-000000000001,a1b2c3d4-0000-0000-0000-000000000002
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
--role-keys a1b2c3d4-0000-0000-0000-000000000001 \
--output-filter 'Data.RolesAssigned'
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
--role-keys a1b2c3d4-0000-0000-0000-000000000001
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
--role-keys a1b2c3d4-0000-0000-0000-000000000001,a1b2c3d4-0000-0000-0000-000000000002
uip or users assign-roles d4e5f6a7-0000-0000-0000-000000000001 \
--role-keys a1b2c3d4-0000-0000-0000-000000000001 \
--output-filter 'Data.RolesAssigned'
数据形状(--输出 json)
{
"Code": "UserRolesAssigned",
"Data": {
"UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
"RolesAssigned": 1,
"Status": "Assigned successfully"
}
}
{
"Code": "UserRolesAssigned",
"Data": {
"UserKey": "d4e5f6a7-0000-0000-0000-000000000001",
"RolesAssigned": 1,
"Status": "Assigned successfully"
}
}
退出代码
请参阅退出代码。没有动词特定的覆盖。
相关命令
uip or roles— 管理角色和角色用户成员身份。uip or folders— 在unassignusers assign文件夹密钥。uip or jobs— 尤其是jobs start --user-keys。
另请参阅
- 大纲
- 动词
- uip 或用户列表
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或文件夹中的用户列表
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或用户列表-可用
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或用户获取
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- UIP 或用户创建
- 选项
- 示例
- 数据形状(--输出 json)
- UIP 或用户删除
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- UIP 或用户分配
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或用户取消分配
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或用户编辑
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或用户当前值
- 选项
- 示例
- 数据形状(--输出 json)
- uip 或用户分配角色
- 参数
- 选项
- 示例
- 数据形状(--输出 json)
- 退出代码
- 相关命令
- 另请参阅