Skip to main content

Get-LXC1OrgUser

This cmdlet returns a list of users or a specific user in Lenovo XClarity One portal.

Note
You cannot pipe objects to this cmdlet.

Syntax

Get-LXC1OrgUser [-Status String[]]
[-Role String[]]
[-Name String[]]
[-NameSearchType String]
[-Email String[]]
[-EmailSearchType String]
[-Anywhere String[]]
[-AnywhereSearchType String]
[-Connection LXC1Connection]
[CommonParameter]

Get-LXC1OrgUser -ID String
[-Connection LXC1Connection]
[CommonParameter]
Parameters
-ID String[]
Specifies the ID of the user to return.
-Status String[]
Specifies one or more user account statuses, separated by a comma.
  • Pending
  • Active
  • Disabled
-Role String[]
Specifies one or more user roles, separated by a comma.
  • userAdmin. Grants user administration privileges.
  • hubAdmin. Grants hub administration privileges.
  • deviceAdmin. Grants device administration privileges.
-Name String[]
Specifies one or more full or partial personal names of users, separated by comma. All users that match any of the specified patterns based on the operator (-NameSearchType parameter) are returned.
-NameSearchType String
Specifies the operator to use for patterns in the -Name parameter. This can be one of the following values.
  • contains (default)
  • notContains
  • equals
  • notEquals

If -Name is not specified, this parameter is ignored.

-Email String[]
Specifies one or more full or partial email addresses, separated by comma. All users that match any of the specified patterns based on the operator (-EmailSearchType parameter) are returned.
-EmailSearchType String
Specifies the operator to use for patterns in the -Email parameter. This can be one of the following values.
  • contains (default)
  • notContains
  • equals
  • notEquals

If -Email is not specified, this parameter is ignored.

-Anywhere String[]
Specifies one or more full or partial text found in any user attributes, separated by a comma. All discovered devices that match any of the specified patterns based on the operator (-AnywhereSearchType parameter) are returned.
-AnywhereSearchType String
Specifies the operator to use for patterns in the -Anywhere parameter. This can be one of the following values.
  • contains (default)
  • notContains
  • equals
  • notEquals

If -Anywhere is not specified, this parameter is ignored.

-Connection LXC1Connection
Specifies the connection to the XClarity One server. If no connection is specified, the result from the last Connect-LXC1 cmdlet is used.
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

Examples

The following example returns all active users.
param (
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword)
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$result = Get-LXC1OrgUser

$result | Format-List
The following example returns active users filtered by name, email, status, and role.
param (
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword)
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$result = Get-LXC1OrgUser -Name "john","jane" `
-NameSearchType contains `
-Email "@lenovo.com" `
-EmailSearchType contains `
-Status Active,Pending `
-Role orgOwner,userAdmin

$result | Format-List
The following example returns a specific organization user by ID.
param (
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $ClientID,
[Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] $UserSecret
)

$securePassword = ConvertTo-SecureString $UserSecret -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($ClientID, $securePassword)
$hostOnprem = "192.0.2.0"

$connection = Connect-LXC1 -PortalAddress $hostOnprem `
-Credential $cred `
-PortalType cloud `
-SkipCertificateCheck

$result = Get-LXC1OrgUser -ID "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

$result