UpdateScanCredential

<< Click to Display Table of Contents >>

UpdateScanCredential

Updates an existing scan credential stored in PDQ Inventory. This is used to rotate the password (and optionally the username) for a credential that PDQ Inventory uses when scanning target computers. Designed for automated password rotation workflows and PAM integrations.

Syntax

PDQInventory UpdateScanCredential -Username <domain\username> [-Password <password>] [-SecurePassword] [-CreateIfNotExists]

Parameters

Parameter

Required

Description

-Username <domain\username>

Yes

The username of the credential to update or create (e.g., DOMAIN\svcaccount). Must match an existing credential in PDQ Inventory unless -CreateIfNotExists is set.

-Password <password>

No

The new password. If omitted and -SecurePassword is not set, you will be prompted interactively. WARNING: passwords passed on the command line may be visible in process listings and shell history.

-SecurePassword

No

Prompts for the password interactively. The password is not echoed to the screen. Recommended over -Password when running interactively.

-CreateIfNotExists

No

Creates the credential if no credential with the specified username exists.

Exit Codes

Exit Code

Meaning

0

Credential updated successfully.

1

Failure. The credential was not found, the save failed, or another error occurred.

2

User cancelled at the interactive password prompt.

Examples

Update the password for an existing credential interactively:

PDQInventory UpdateScanCredential -Username DOMAIN\svcaccount -SecurePassword

Update a credential password from a PAM tool via stdin:

Get-Secret -Name ScanAccount | ConvertFrom-SecureString -AsPlainText | PDQInventory UpdateScanCredential -Username DOMAIN\svcaccount

Create a credential if it does not already exist:

PDQInventory UpdateScanCredential -Username DOMAIN\svcaccount -SecurePassword -CreateIfNotExists

NOTE: The PDQ Inventory background service must be running for this command to work. The -Username must exactly match the username stored in PDQ Inventory Preferences > Credentials.

 

 

 

© 2026 PDQ.com Corporation. All rights reserved.

PDQ.com is a trademark of PDQ.com Corporation. All other product and company names are the property of their respective owners.

Help Version: 20.0.22.0