< Back
Add-iBMCUser
Post
NAME Add-iBMCUser
SYNOPSIS
Add a new iBMC user account.
SYNTAX
Add-iBMCUser [-Session] <RedfishSession[]> [-Username] <String[]> [-Password] <Object[]> [-Role] {Administrator |
Operator | Commonuser | Noaccess | CustomRole1 | CustomRole2 | CustomRole3 | CustomRole4} [<CommonParameters>]
DESCRIPTION
Add a new iBMC user account. The session user must have privilege to add new user.
PARAMETERS
-Session <RedfishSession[]>
iBMC redfish session object which is created by Connect-iBMC cmdlet.
A session object identifies an iBMC server to which this cmdlet will be executed.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Username <String[]>
Username specifies the new username to be added.
A string of 1 to 16 characters is allowed. It can contain letters, digits, and special characters (excluding
<>&,'"/\\%), but cannot contain spaces or start with a number sign (#).
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Password <Object[]>
Password specifies the password of this new add user.
A string of 1 to 20 characters is allowed.
- If password complexity check is enabled for other interfaces, the password must meet password complexity
requirements.
- If password complexity check is not enabled for other interfaces, there is not restriction on the password
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Role
Role specifies the role of this new add user.
Available role value set is:
- "Administrator"
- "Operator"
- "Commonuser"
- "Noaccess"
- "CustomRole1"
- "CustomRole2"
- "CustomRole3"
- "CustomRole4"
Required? true
Position? 4
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
PSObject[]
Returns the new created User object array if cmdlet executes successfully.
In case of an error or warning, exception will be returned.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Create a new user with name "new-user" for a single iBMC server
PS C:\\> $credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $pwd = ConvertTo-SecureString -String new-user-password -AsPlainText -Force
PS C:\\> $User = Add-iBMCUser -Session $session -Username new-user -Password $pwd -Role Operator
PS C:\\> $User
Host : 10.1.1.2
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Create a new user with name "new-user" for a single iBMC server with pipelined session
PS C:\\> $credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.10.10.2 -Credential $credential -TrustCert
PS C:\\> $pwd = ConvertTo-SecureString -String new-user-password -AsPlainText -Force
PS C:\\> ,$session | Add-iBMCUser -Username new-user -Password $pwd -Role Operator
Host : 10.1.1.2
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Create a new user with name "new-user" for multiple iBMC servers with pipelined session
PS C:\\> $credential = Get-Credential
PS C:\\> $sessions = Connect-iBMC -Address 10.10.10.2-3 -Credential $credential -TrustCert
PS C:\\> $pwd = ConvertTo-SecureString -String new-user-password -AsPlainText -Force
PS C:\\> ,$sessions | Add-iBMCUser -Username new-user,new-user2 -Password $pwd,$pwd -Role Operator,Administrator
Host : 10.1.1.2
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
Host : 10.1.1.3
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCUser
Set-iBMCUser
Remove-iBMCUser
Connect-iBMC
Disconnect-iBMC
SYNOPSIS
Add a new iBMC user account.
SYNTAX
Add-iBMCUser [-Session] <RedfishSession[]> [-Username] <String[]> [-Password] <Object[]> [-Role] {Administrator |
Operator | Commonuser | Noaccess | CustomRole1 | CustomRole2 | CustomRole3 | CustomRole4} [<CommonParameters>]
DESCRIPTION
Add a new iBMC user account. The session user must have privilege to add new user.
PARAMETERS
-Session <RedfishSession[]>
iBMC redfish session object which is created by Connect-iBMC cmdlet.
A session object identifies an iBMC server to which this cmdlet will be executed.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Username <String[]>
Username specifies the new username to be added.
A string of 1 to 16 characters is allowed. It can contain letters, digits, and special characters (excluding
<>&,'"/\\%), but cannot contain spaces or start with a number sign (#).
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Password <Object[]>
Password specifies the password of this new add user.
A string of 1 to 20 characters is allowed.
- If password complexity check is enabled for other interfaces, the password must meet password complexity
requirements.
- If password complexity check is not enabled for other interfaces, there is not restriction on the password
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Role
Role specifies the role of this new add user.
Available role value set is:
- "Administrator"
- "Operator"
- "Commonuser"
- "Noaccess"
- "CustomRole1"
- "CustomRole2"
- "CustomRole3"
- "CustomRole4"
Required? true
Position? 4
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
PSObject[]
Returns the new created User object array if cmdlet executes successfully.
In case of an error or warning, exception will be returned.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Create a new user with name "new-user" for a single iBMC server
PS C:\\> $credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.1.1.2 -Credential $credential -TrustCert
PS C:\\> $pwd = ConvertTo-SecureString -String new-user-password -AsPlainText -Force
PS C:\\> $User = Add-iBMCUser -Session $session -Username new-user -Password $pwd -Role Operator
PS C:\\> $User
Host : 10.1.1.2
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Create a new user with name "new-user" for a single iBMC server with pipelined session
PS C:\\> $credential = Get-Credential
PS C:\\> $session = Connect-iBMC -Address 10.10.10.2 -Credential $credential -TrustCert
PS C:\\> $pwd = ConvertTo-SecureString -String new-user-password -AsPlainText -Force
PS C:\\> ,$session | Add-iBMCUser -Username new-user -Password $pwd -Role Operator
Host : 10.1.1.2
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Create a new user with name "new-user" for multiple iBMC servers with pipelined session
PS C:\\> $credential = Get-Credential
PS C:\\> $sessions = Connect-iBMC -Address 10.10.10.2-3 -Credential $credential -TrustCert
PS C:\\> $pwd = ConvertTo-SecureString -String new-user-password -AsPlainText -Force
PS C:\\> ,$sessions | Add-iBMCUser -Username new-user,new-user2 -Password $pwd,$pwd -Role Operator,Administrator
Host : 10.1.1.2
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
Host : 10.1.1.3
Id : 12
Name : User Account
UserName : new-user
RoleId : Operator
Locked : True
Enabled : True
Oem : @{Huawei=}
RELATED LINKS
https://github.com/Huawei/Huawei-iBMC-Cmdlets
Get-iBMCUser
Set-iBMCUser
Remove-iBMCUser
Connect-iBMC
Disconnect-iBMC