Add-LXCARoleGroup

This cmdlet creates a role group.

Note: You cannot pipe objects to this cmdlet.

Syntax

Add-LXCARoleGroup [-Connection LXCAConnection] 
                  [-Description String] 
                   -RoleGroupName String 
                   -RoleList String[]
                  [-UserList String[]]
                  [CommonParameter]

Parameters

-Connection LXCAConnection
Specifies the connection to the Lenovo XClarity Administrator server. If no connection is specified, the result from the last Connect-LXCA cmdlet is used.
-Description String
Specifies the description for the new role group.
-RoleGroupName String
Specifies the name of the role group to be created. The name must be unique.
-RoleList String[]
One or more roles to be associated with the new role group. This can be one of the following values.
  • LXC-ADMIN. Includes the lxca-admin role.

  • LXC-RECOVERY. Includes the lxc-recovery role.

  • LXC-SECURITY-ADMIN. Includes the lxc-security-admin role.

  • LXC-SUPERVISOR. Includes the lxc-supervisor role.

  • LXC-OPERATOR. Includes the lxc-operator role.

  • LXC-FW-ADMIN. Includes the lxc-fw-admin role.

  • LXC-OS-ADMIN. Includes the lxc-os-admin role.

  • LXC-HW-ADMIN. Includes the lxc-hw-admin role.

  • LXC-SERVICE-ADMIN. Includes the lxc-service-admin role.

  • LXC-HW-MANAGER. Includes the lxc-hw-manager role.

The following predefined roles are reserved and cannot be used to create new role groups or assigned to new users.

-UserList String[]
Specifies the IDs of one or more users to associate with the role group. You can use the Get-LXCAUserAccount cmdlet to obtain the user IDs.
CommonParameters
This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.

Results

This cmdlet does returns a RoleGroup object.

Examples

The following example creates a role group that is associated with two roles and two users.

$cred = Get-Credential
Connect-LXCA -Host 192.0.2.0 -Credential $cred
$role = Get-LXCARole 
$user = Get-LXCAUserAccount -GetUserName 
Add-LXCARoleGroup -RoleGroupName $name -Description $desc -RoleList $role[0],$role[2]
                  -UserList $user[0],$user[1]

Related links