Set HPOVUser - HewlettPackard/POSH-HPEOneView GitHub Wiki

HPE OneView 4.10 Library

Set-HPOVUser

Modify an existing user account.

SYNTAX

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

Detailed 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-HPOVUserPassword cmdlet.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.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.

Default Value: ${Global:ConnectedSessions} | ? Default

Aliases Appliance
Required? true
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
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

-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

-Enabled <SwitchParameter>

Enable the local user account.

Aliases enable
Required? false
Position? named
Default value False
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

-MobilePhone <String>

Updated mobile phone number

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

-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

-Roles <Array>

Aliases [-r, -role] The role(s) to assign to the Directroy Group, in System.Collections.ArrayList format. Accepted values are noted within the ApplianceRoles property of the HPOneView.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

-ScopePermissions <Array>

Array collection of Hashtable<Role; Scope>. Will overwrite existing scope to role mappings.

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

Aliases None
Required? False
Position? named
Default value
Accept pipeline input? false
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

-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

<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

HPOneView.Appliance.User [System.Management.Automation.PSCustomObject]

HPE OneView User Account object created on an appliance

Return Values

HPOneView.Appliance.User [System.Management.Automation.PSCustomObject]

If successful, returns a user resource

Examples

 -------------------------- EXAMPLE 1 --------------------------

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

Update the user account "Sally" with new roles.

 -------------------------- EXAMPLE 2 --------------------------

Set-HPOVUser -username Sally -password NewP@ssw0rd

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

 -------------------------- EXAMPLE 3 --------------------------

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

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

Related Links


Top

HPE OneView 4.00 Library

Set-HPOVUser

Modify an existing user account.

SYNTAX

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

Detailed 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-HPOVUserPassword cmdlet.

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.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.

Default Value: ${Global:ConnectedSessions} | ? Default

Aliases Appliance
Required? true
Position? named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
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

-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

-Enabled <SwitchParameter>

Enable the local user account.

Aliases enable
Required? false
Position? named
Default value False
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

-MobilePhone <String>

Updated mobile phone number

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

-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

-Roles <Array>

Aliases [-r, -role] The role(s) to assign to the Directroy Group, in System.Collections.ArrayList format. Accepted values are noted within the ApplianceRoles property of the HPOneView.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

-ScopePermissions <Array>

Array collection of Hashtable<Role; Scope>. Will overwrite existing scope to role mappings.

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

Aliases None
Required? False
Position? named
Default value
Accept pipeline input? false
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

-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

<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

HPOneView.Appliance.User [System.Management.Automation.PSCustomObject]

HPE OneView User Account object created on an appliance

Return Values

HPOneView.Appliance.User [System.Management.Automation.PSCustomObject]

If successful, returns a user resource

Examples

 -------------------------- EXAMPLE 1 --------------------------

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

Update the user account 'Sally' with new roles.

 -------------------------- EXAMPLE 2 --------------------------

Set-HPOVUser -username Sally -password NewP@ssw0rd

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

 -------------------------- EXAMPLE 3 --------------------------

$Scope = Get-HPOVScope -Name Scope1 -ErrorAction Stop Get-HPOVUser -Username Sally | Set-HPOVUser -Roles 'Server administrator' -ScopePermissions @{Role = 'Network administrator'; Scope = $Scope }

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

Related Links


Top
⚠️ **GitHub.com Fallback** ⚠️