Dynamics GP User Unlock Tool

One of the first admin tasks that I used PowerShell to simplify was the unlocking of Dynamics GP user accounts. If you’ve dealt with this before, you know what a PITA it is to simply unlock someone’s GP account if they entered the wrong password too many times. This is a simple attempt at avoiding the headache of having to…

  1. Login to SQL Management Studio
  2. Reset the password for the user’s SQL login.
  3. Unlock the user’s SQL login.
  4. Launch Dynamics GP, login, and reset their password (again) within GP.

Instead, you can use this script and do the following…

  1. Launch this script.
  2. Choose the user in the drop-down, and click a button.
  3. Go back and work on something else 🙂

It could use some improvements, but it’s a “version 1” attempt at making our lives easier, and it has already come in handy many times.

[Jan 21, 2016]
I just made some small adjustments, adding the option to also reset the user’s GP password if they have forgotten it. Some extra steps to get that working…

gpunlocktooluserreset
First, go into Dynamics GP and reset a test user’s GP password with your “new user temporary password” value, if you have one. If you don’t this won’t really work for you.

 

gpunlocktoolpasswordhash
Go into SQL Server Management Studio, and run the following query for your test user that you just reset the password for…

SELECT name, password_hash FROM sys.sql_logins WHERE name = ‘YourTestUsersName’

Copy the value from the password_hash column, you’ll use that in the GP-UnlockUser.ps1 file, editing the value for the $global:gpPasswordHash global variable.

 

Check it out and let me know what you think 🙂

On GitHub: https://github.com/gregbesso/DynamicsGPUserUnlockTool

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s