New-ITGluePassword

SYNOPSIS

Create a password / Create a password for a particular organization

SYNTAX

Create (Default)

New-ITGluePassword -Data <Object> [-ShowPassword <bool>] [-Raw] [-WhatIf] [-Confirm]

ByOrganization

New-ITGluePassword [-OrganizationId] <long> -Data <Object> [-ShowPassword <bool>] [-Raw] [-WhatIf]
 [-Confirm]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ Create ] - The New-ITGluePassword cmdlet invokes the POST method of the /passwords endpoint (Create a password)

Creates a password under the organization specified in the ID parameter. Returns the created object if successful. Use the nested relationships route to add multiple passwords to an organization in bulk.

Keep in mind that you can create general and embedded passwords with this endpoint: If the ‘resource-id’ and ‘resource-type’ attributes are NOT provided, IT Glue assumes the password is a general password. If the ‘resource-id’ and ‘resource-type’ attributes are provided, IT Glue assumes the password is an embedded password. Learn more about the difference between general and embedded passwords in this article.

The request body must contain a JSON object, for example:

{ “data”: { “type”: “passwords”, “attributes”: { “name”: “Meraki Dashboard Administrator Login”, “username”: “dashboardadmin@happyfrog.itglue.com”, “password”: “p4ssw0rd”, “otpSecret”:”SAFDSAFDSADFASDFASDF”, “url”: “https://meraki.itglue.com/secure/login/dashboard_login”, “notes”: “Admin credentials for Happy Frog’s Meraki account.”, “password-category-id”: 71326, “password-category-name”: “Wireless”, } } }

To create multiple passwords, the JSON object will look something like:

{ “data”: [ { “type”: “passwords”, “attributes”: {…} }, { “type”: “passwords”, “attributes”: {…} } ] }

Parameter set [ ByOrganization ] - The New-ITGluePassword cmdlet invokes the POST method of the /organizations/{organization_id}/relationships/passwords endpoint (Create a password for a particular organization)

Creates a password under the organization specified in the ID parameter. Returns the created object if successful. Use the nested relationships route to add multiple passwords to an organization in bulk.

Keep in mind that you can create general and embedded passwords with this endpoint: If the ‘resource-id’ and ‘resource-type’ attributes are NOT provided, IT Glue assumes the password is a general password. If the ‘resource-id’ and ‘resource-type’ attributes are provided, IT Glue assumes the password is an embedded password. Learn more about the difference between general and embedded passwords in this article.

The request body must contain a JSON object, for example:

{ “data”: { “type”: “passwords”, “attributes”: { “name”: “Meraki Dashboard Administrator Login”, “username”: “dashboardadmin@happyfrog.itglue.com”, “password”: “p4ssw0rd”, “otpSecret”:”SAFDSAFDSADFASDFASDF”, “url”: “https://meraki.itglue.com/secure/login/dashboard_login”, “notes”: “Admin credentials for Happy Frog’s Meraki account.”, “password-category-id”: 71326, “password-category-name”: “Wireless”, } } }

To create multiple passwords, the JSON object will look something like:

{ “data”: [ { “type”: “passwords”, “attributes”: {…} }, { “type”: “passwords”, “attributes”: {…} } ] }

This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it

EXAMPLES

EXAMPLE 1

New-ITGluePassword -Data @{} -WhatIf

Shows the POST request to the /passwords endpoint without sending it

EXAMPLE 2

New-ITGluePassword -OrganizationId 12345 -Data @{} -WhatIf

Shows the POST request to the /organizations/{organization_id}/relationships/passwords endpoint without sending it

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Data

Defines the data of the JSON:API request body. Accepts a hashtable, an object, or a JSON string

The value is sent as the data property of the request body, such as @{ type = ‘organizations’; attributes = @{ name = ‘Example’ } }. An object with a single data property & a JSON string are sent as is

Body properties:

  • type (string) - passwords
  • attributes (object):
    • archived (boolean)
    • autofill_selectors (string) - Used for identification of fields for password autofill
    • generated_password_type (string) - This value indicates if the user is using the complex password feature, and if the password is complex or pronounceable.
    • id (integer) - Required identifier for bulk updates
    • is_live (boolean) - Used for understanding - is this a live version of the password or not.
    • name (string)
    • notes (string)
    • organization_id (integer) - Not required when using nested relationship routes
    • otp_secret (string) - One Time Password secret
    • password (string)
    • password_category_id (integer)
    • password_updated_at (string) - Date the password last changed
    • resource_id (integer) - Must be used together with ‘resource_type’
    • resource_type (string) - Must be used together with ‘resource_id’
    • restricted (boolean)
    • shareable (boolean) - Indicates if password is can be shared with Secure Password Sharing feature.
    • url (string)
    • username (string)
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByOrganization
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Create
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-OrganizationId

Only required for nested relationships route

Notes: Must be a valid Organization Id in your Account

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases:
- organization_id
ParameterSets:
- Name: ByOrganization
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Raw

Returns the full API response (data, meta, links, & included) instead of only the data

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ShowPassword

defaults to ‘false’, Can be set to ‘true’ to return the password

Type: System.Boolean
DefaultValue: False
SupportsWildcards: false
Aliases:
- show_password
ParameterSets:
- Name: ByOrganization
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: Create
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

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

System.Int64

OUTPUTS

NOTES

Endpoint : POST /passwords Endpoint : POST /organizations/{organization_id}/relationships/passwords