Table of Contents

login

Free

Description

Authenticates a user to a specified vault.

For a walkthrough of every login mode and illustrated Credential Manager setup, see Log into PDM and File Explorer.

Syntax

login [-auto|-win|-external|-explorer] -vaultName "vault" [-username "user" -password "password" | -credentials "target-name"]

Parameters

Parameter Alias Required Description
-auto -a No Automatic authentication with current user. Displays login dialog box if not logged in.
-win -w No Automatic Windows authentication with current user. Does not display login dialog box.
-username -u No Username.
-password -p No Password.
-external -ex No Toggle ensures that a license is consumed.
-explorer No Log into the PDM File Explorer client and open the vault in a new Explorer window. Requires -username and -password, or -credentials. Leaves PDMShell's connection unchanged.
-credentials No Read the username and password from a named Windows Credential Manager Generic Credential. Cannot combine with -username, -password, or -auto.
-vaultName -v Yes Vault Name.

Examples

login -username admin -password ******** -vaultName bluebyte #logs into the bluebyte vault with a username ans a password
login -auto -vaultName bluebyte #logs into the blue byte vault using the existing PDM session

Remarks

Use a saved Windows credential

Important

Choose “Add a generic credential,” not “Add a Windows credential.”

Both appear on the Windows Credentials tab, but they create different types of entries. PDMShell's -credentials option reads only entries listed under Generic Credentials.

  1. Open Credential Manager from the Windows Start menu.
  2. Select the Windows Credentials tab.
  3. Scroll to Generic Credentials and click Add a generic credential.
  4. In Internet or network address, enter a name such as pdmshell.
  5. Enter your PDM username and password, then click OK.
  6. Use that same entry name with -credentials:
login -explorer -vaultName "sandbox" -credentials "pdmshell"

PDMShell reads that exact Generic Credential from the Windows account running it. The password does not appear in the script. This also works with regular login, -win, and -external. Do not combine -credentials with -username, -password, or -auto.

The entry must already exist for that Windows account. This option does not retrieve the Windows sign-in password or assume that PDM's own saved login uses Credential Manager.

“The named Generic Credential was not found”

Check that the entry is listed under Generic Credentials, that its name matches the value after -credentials, and that PDMShell is running as the Windows account that saved it.

If you saved it under the Windows Credentials section instead, add a new Generic Credential with the same name and your PDM login details. You do not need to delete the existing Windows credential.

Log into File Explorer

Use this when a startup script needs to log into the vault in Windows File Explorer:

login -explorer -vaultName "sandbox" -username "Admin" -password "your-password"

PDMShell finds the installed vault view, invokes its Log In menu command, fills the PDM login dialog, and verifies the client login before opening a new Explorer window. Run it in the signed-in Windows user's desktop session. For an empty password, pass -password "".

If that user is already logged in, the command opens the vault without submitting credentials again. If a different user is logged in, log out of the vault first. The command does not force another user out.

This mode does not connect PDMShell itself. To run further vault commands in PDMShell, follow it with login -auto -vaultName "sandbox". Do not combine -explorer with -auto, -win, or -external on the same command.

The current automation requires the English Log In menu and PDM login dialog. If PDM displays a login error, PDMShell reports its message in the console, dismisses the error, and closes that login attempt. It does not retry rejected credentials. The script's error-handling settings determine whether execution continues. Cancel closes the attempt's dialogs and reports cancellation. A 60-second timeout handles an unresponsive login. Keep scripts containing passwords private.

Other login modes

  • You must have a local vault view before you can start using PDMShell.
  • The external parameter allows an application that is not supplied and supported by SOLIDWORKS Corporation to:
    • Log into SOLIDWORKS PDM Professional
    • Log into a vault view

Tutorial