Skip to content

Latest commit

 

History

History
248 lines (187 loc) · 4.51 KB

New-AnsibleUser.md

File metadata and controls

248 lines (187 loc) · 4.51 KB
external help file Module Name online version schema
Jagabata.psm.dll-Help.xml
Jagabata.psm
2.0.0

New-AnsibleUser

SYNOPSIS

Create a User.

SYNTAX

Credential (Default)

New-AnsibleUser [-Credential] <PSCredential> [-FirstName <String>] [-LastName <String>] [-Email <String>]
 [-IsSuperUser] [-IsSystemAuditor] [-WhatIf] [-Confirm] [<CommonParameters>]

SecureString

New-AnsibleUser [-UserName] <String> [-Password <SecureString>] [-FirstName <String>] [-LastName <String>]
 [-Email <String>] [-IsSuperUser] [-IsSystemAuditor] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Create a User.

Implements following Rest API:

  • /api/v2/users/ (POST)

EXAMPLES

Example 1

PS C:\> New-AnsibleUser -Email teramako@gmail.com

cmdlet New-AnsibleUser at command pipeline position 1
Supply values for the following parameters:
Credential
User: user1
Password for user user1: ********

Input UserName and Password via prompts.

Example 2

PS C:\> New-AnsibleUser -Credential (Get-Credential -UserName user2)

PowerShell credential request
Enter your credentials.
Password for user user2: ********

Input UserName and Password via Microsoft.PowerShell.Security\Get-Credential.

Example 3

PS C:\> New-AnsibleUser -UserName user3 -Email teramako@gmail.com

<== Password for user3
Password: *******

Input Password via a prompt.

PARAMETERS

-Credential

Credential (UserName and Password)

See: Get-Help Get-Credential.

Type: PSCredential
Parameter Sets: Credential
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Email

Email address

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FirstName

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsSuperUser

Designates that the User has all permissions without explicitly assinging them.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsSystemAuditor

Designates that the User is the system auditor.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LastName

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Password

Specify SecureString object generated by commands such as ConvertTo-SecureString. This may be useful for batch operations.

Type: SecureString
Parameter Sets: SecureString
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UserName

User name.

Type: String
Parameter Sets: SecureString
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

Jagabata.Resources.User

New created User object.

NOTES

RELATED LINKS

Get-AnsibleUser

Find-AnsibleUser

Update-AnsibleUser

Register-AnsibleUser

Unregister-AnsibleUser

Remove-AnsibleUser