Skip to content

Set-OVUser

Syntax

Set-OVUser
    [-UserName] <String>
    [-Password <String>]
    [-FullName <String>]
    [-Roles <Array>]
    [-Append]
    [-ScopePermissions <Array>]
    [-EmailAddress <String>]
    [-OfficePhone <String>]
    [-MobilePhone <String>]
    [-Enabled]
    [-Disabled]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]
Set-OVUser
    [-UserObject] <Object>
    [-Password <String>]
    [-FullName <String>]
    [-Roles <Array>]
    [-Append]
    [-ScopePermissions <Array>]
    [-EmailAddress <String>]
    [-OfficePhone <String>]
    [-MobilePhone <String>]
    [-Enabled]
    [-Disabled]
    [-ApplianceConnection <Object>]
    [<CommonParameters>]

Description

Modify or update an existing local user account on the management appliance. This Cmdlet will not update the password or roles of the currently logged in user account. To update your HPE OneView appliance local account"s password, please use the Set-OVUserPassword Cmdlet.

Examples

Example 1

Set-OVUser -username Sally -roles @("server administrator","network administrator")

Update the user account "Sally" with new roles.

Example 2

Set-OVUser -username Sally -password NewP@ssw0rd

Update the user account "Sally" with a new password.

Example 3

$Scope = Get-OVScope -Name Scope1 -ErrorAction Stop
Get-OVUser -Username Sally | Set-OVUser -Roles "Server administrator" -ScopePermissions @{Role = "Network administrator"; Scope = $Scope }

Modify the user account with the new role and scope permissions.

Parameters

-UserObject <Object>

The object of the user account to be updated.

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-UserName <String>

The name or object of the user account to be updated.

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-Password <String>

New password for the user account. Passwords must be at least 8 characters.

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-FullName <String>

Updated Full Name of the User Account.

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-Roles <Array>

The role(s) to assign to the Directroy Group, in [System.Collections.ArrayList] format. Accepted values are noted within the ApplianceRoles property of the [HPEOneView.Appliance.Connection] object stored in the $Global:ConnectedSessions variable.

Example: $roles = "Server administrator","Network administrator"

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-EmailAddress <String>

Updated Email Address of the User Account.

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-OfficePhone <String>

Updated office phone of the User Account.

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-MobilePhone <String>

Updated mobile phone number

Aliases None
Required? True
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-Enabled <SwitchParameter>

Enable the local user account.

Aliases enable
Required? False
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters? False

-Disabled <SwitchParameter>

Disable the local user account.

Aliases disable
Required? False
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters? False

-ApplianceConnection <Object>

Specify one or more [HPEOneView.Appliance.Connection] object(s) or Name property value(s). If Resource object is provided via Pipeline, the ApplianceConnection property of the object will be used.

Aliases Appliance
Required? True
Position? Named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-ScopePermissions <Array>

Array collection of Hashtable. Will overwrite existing scope to role mappings.

Example: -ScopePermissions @{Role = "Network administrator"; Scope = (Get-OVScope -Name CorpNetAdmins -ErrorAction Stop) }

Aliases None
Required? False
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-Append <SwitchParameter>

Use to append roles and/or scope permissions update. If omitted, roles or scope permissions will be replaced.

Aliases None
Required? False
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

HPE OneView User Account object created on an appliance

Return Values

If successful, returns a user resource