< Back

New-PasswordStatePassword

Sat Jan 18, 2020 6:39 pm

NAME New-PasswordStatePassword



SYNOPSIS

Create a new password in PasswordState.





SYNTAX

New-PasswordStatePassword -ApiKey <PSCredential> -PasswordListId <Int32> [-Endpoint <String>] [-Format <String>]

-Title <String> -Password <SecureString> [-Username <String>] [-Description <String>] [-GenericField1 <String>]

[-GenericField2 <String>] [-GenericField3 <String>] [-GenericField4 <String>] [-GenericField5 <String>]

[-GenericField6 <String>] [-GenericField7 <String>] [-GenericField8 <String>] [-GenericField9 <String>]

[-GenericField10 <String>] [-Notes <String>] [-AccountTypeID <Int32>] [-Url <String>] [-ExpiryDate <String>]

[-AllowExport <Boolean>] [-GenerateGenFieldPassword] [-UseV6Api] [-WhatIf] [-Confirm] -DocumentDescription

<String> -DocumentName <String> -DocumentPath <String> [<CommonParameters>]



New-PasswordStatePassword -ApiKey <PSCredential> -PasswordListId <Int32> [-Endpoint <String>] [-Format <String>]

-Title <String> -Password <SecureString> [-Username <String>] [-Description <String>] [-GenericField1 <String>]

[-GenericField2 <String>] [-GenericField3 <String>] [-GenericField4 <String>] [-GenericField5 <String>]

[-GenericField6 <String>] [-GenericField7 <String>] [-GenericField8 <String>] [-GenericField9 <String>]

[-GenericField10 <String>] [-Notes <String>] [-AccountTypeID <Int32>] [-Url <String>] [-ExpiryDate <String>]

[-AllowExport <Boolean>] [-GenerateGenFieldPassword] [-UseV6Api] [-WhatIf] [-Confirm] [<CommonParameters>]



New-PasswordStatePassword -ApiKey <PSCredential> -PasswordListId <Int32> [-Endpoint <String>] [-Format <String>]

-Title <String> [-Username <String>] [-Description <String>] [-GenericField1 <String>] [-GenericField2 <String>]

[-GenericField3 <String>] [-GenericField4 <String>] [-GenericField5 <String>] [-GenericField6 <String>]

[-GenericField7 <String>] [-GenericField8 <String>] [-GenericField9 <String>] [-GenericField10 <String>] [-Notes

<String>] [-AccountTypeID <Int32>] [-Url <String>] [-ExpiryDate <String>] [-AllowExport <Boolean>]

-GeneratePassword [-GenerateGenFieldPassword] [-UseV6Api] [-WhatIf] [-Confirm] -DocumentDescription <String>

-DocumentName <String> -DocumentPath <String> [<CommonParameters>]



New-PasswordStatePassword -ApiKey <PSCredential> -PasswordListId <Int32> [-Endpoint <String>] [-Format <String>]

-Title <String> [-Username <String>] [-Description <String>] [-GenericField1 <String>] [-GenericField2 <String>]

[-GenericField3 <String>] [-GenericField4 <String>] [-GenericField5 <String>] [-GenericField6 <String>]

[-GenericField7 <String>] [-GenericField8 <String>] [-GenericField9 <String>] [-GenericField10 <String>] [-Notes

<String>] [-AccountTypeID <Int32>] [-Url <String>] [-ExpiryDate <String>] [-AllowExport <Boolean>]

-GeneratePassword [-GenerateGenFieldPassword] [-UseV6Api] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Create a new password in PasswordState.





PARAMETERS

-ApiKey <PSCredential>

The API key for the password list in PasswordState.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-PasswordListId <Int32>

The Id of the password list in PasswordState.



Required? true

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-Endpoint <String>

The Uri of your PasswordState site. (i.e. https://passwordstate.local)



Required? false

Position? named

Default value (_GetDefault -Option 'api_endpoint')

Accept pipeline input? False

Accept wildcard characters? false



-Format <String>

The response format from PasswordState. Choose either json or xml.



Required? false

Position? named

Default value Json

Accept pipeline input? False

Accept wildcard characters? false



-Title <String>

The title field for the password entry.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Password <SecureString>

The password field for the password entry.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Username <String>

The username field for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

The description field for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField1 <String>

The generic field 1 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField2 <String>

The generic field 2 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField3 <String>

The generic field 3 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField4 <String>

The generic field 4 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField5 <String>

The generic field 5 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField6 <String>

The generic field 6 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField7 <String>

The generic field 7 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField8 <String>

The generic field 8 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField9 <String>

The generic field 9 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GenericField10 <String>

The generic field 10 for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Notes <String>

The notes field for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AccountTypeID <Int32>

The account type id number for the password entry.



Required? false

Position? named

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-Url <String>

The url field for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ExpiryDate <String>

The expire field for the password entry.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-AllowExport <Boolean>

Allow the password to be exported



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-GeneratePassword [<SwitchParameter>]

If set to true, a newly generated random password will be created based on the Password Generator options

associated with the Password List. If the Password List is set to use the user's Password Generator options,

the Default Password Generator options will be used instead.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-GenerateGenFieldPassword [<SwitchParameter>]

If set to true, any 'Generic Fields' which you have set to be of type 'Password' will have a newly generated

random password assigned to it. If the Password List or Generic Field is set to use the user's Password

Generator options, the Default Password Generator options will be used instead.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-UseV6Api [<SwitchParameter>]

PasswordState versions prior to v7 did not support passing the API key in a HTTP header but instead expected

the API key to be passed as a query parameter. This switch is used for backwards compatibility with older

PasswordState versions.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Do not create a new password entry, just show -WhatIf message.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Confirm action before executing.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-DocumentDescription <String>

The description of the document shown in PasswordState



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DocumentName <String>

The name of the file to be displayed in PasswordState, this is also the name used, when the file is downloaded

from PasswordState.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DocumentPath <String>

This is the path to the file, that is to be uploaded to PasswordState



Required? true

Position? named

Default value None

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



NOTES









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



New-PasswordStatePassword -ApiKey $key -PasswordListId 1 -Title 'testPassword' -Username 'testPassword'

-Description 'this is a test' -GeneratePassword



Create a new password entry with an auto-generated password in list with ID 1 and tile of 'testPassword'



RELATED LINKS