Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Updates the properties of an existing local user account, including password, roles, contact information, and account state.

Syntax

By username:
Set-OVUser
    -UserName <String>
    [-Password <String>]
    [-FullName <String>]
    [-Roles <Array>]
    [-Append]
    [-ScopePermissions <Array>]
    [-EmailAddress <String>]
    [-OfficePhone <String>]
    [-MobilePhone <String>]
    [-Enabled]
    [-Disabled]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]
By pipeline (user object):
Get-OVUser -Name <String> | Set-OVUser
    [-Password <String>]
    [-FullName <String>]
    [-Roles <Array>]
    [-Append]
    [-ScopePermissions <Array>]
    [-EmailAddress <String>]
    [-OfficePhone <String>]
    [-MobilePhone <String>]
    [-Enabled]
    [-Disabled]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Set-OVUser updates one or more properties on an existing local user account. Provide either the username string with -UserName or pipe a user object retrieved from Get-OVUser. When -Roles is supplied without -Append, the existing role assignments are replaced with the new list. Use -Append to add roles to the current set without removing any. You cannot modify the password or roles of your own currently authenticated account with this cmdlet. Use Set-OVUserPassword to change your own password.

Parameters

UserObject
Object
A user account object returned by Get-OVUser, accepted from the pipeline. Use this parameter set to update a user by object reference rather than by name.
UserName
string
The login username of the account to modify. Required when not using pipeline input.
Password
string
The new password for the account. Has no effect on the currently authenticated user’s account.
FullName
string
The updated display name for the account.
Roles
Array
One or more role names to assign. Replaces existing roles unless -Append is also specified. Has no effect on the currently authenticated user’s account. See New-OVUser for the list of valid built-in role names.
Append
switch
When specified with -Roles, adds the supplied roles to the account’s existing role set instead of replacing them.
ScopePermissions
Array
An array of hashtables pairing a role name with a scope object. Replaces the existing scope-based permissions. Each entry must have a Role key and a Scope key.
EmailAddress
string
The updated email address for the account. Must be a valid email format.
OfficePhone
string
The updated office phone number.
MobilePhone
string
The updated mobile phone number.
Enabled
switch
Enables a previously disabled account. Aliased as enable.
Disabled
switch
Disables the account, preventing login without deleting it. Aliased as disable.
ApplianceConnection
Object
default:"Default connected session"
The appliance connection object or name. Defaults to the default connected session. Aliased as Appliance.

Examples

Update a user’s password

Set-OVUser -UserName 'jsmith' -Password 'NewS3cur3P@ss!'
Changes the password for the jsmith account.

Replace a user’s role assignments

Set-OVUser -UserName 'jsmith' -Roles 'Network administrator', 'Read only'
Replaces all existing roles on jsmith with Network administrator and Read only.

Append an additional role without removing existing ones

Set-OVUser -UserName 'jsmith' -Roles 'Storage administrator' -Append
Adds the Storage administrator role to whatever roles jsmith already holds.

Disable an account via pipeline

Get-OVUser -Name 'contractor1' | Set-OVUser -Disabled
Retrieves the contractor1 account and disables it.

Update contact details

Set-OVUser -UserName 'jsmith' `
    -FullName 'Jane Smith' `
    -EmailAddress 'jane.smith@example.com' `
    -OfficePhone '+1-555-0100'
Updates the display name, email, and office phone for jsmith.

Output

HPEOneview.Appliance.User Returns the updated user account object.

Build docs developers (and LLMs) love