Jump to content
DarrenWhite99

Script to Test and Reset Cache/Location Drive User and Location Admin Credentials

Recommended Posts

This is a script to test and create or reset the Cache/Location Drive user account credentials and Location Admin credentials. If the credentials are domain based (domain\username, username) they will be tested but will not be reset. If the cacheuser is defined, cannot be validated, and is a local account (.\username) it will be created if missing and the password will be reset. After testing the cache user credentials, the Location Admin will be tested. If it cannot be validated and if it is a local account it will be created if missing, the password will be reset and it will be added to the local Administrators group. The password is always set not to expire if it is being reset.

This script relies on the correct Location configuration of the "Login for Administrator Access" the under the "Deployment and Defaults" tab to obtain the Admin credentials. The Cache User credentials are specified by the Location Drive settings on the General tab for the Location.

The attachment has been moved. See https://www.labtechgeek.com/files/file/24-verify-and-manage-workstation-admin-credentials/

Share this post


Link to post
Share on other sites

Thank you for sharing such an incredibly useful script. We manage mostly Workgroup environment clients and this is a Godsend.

Share this post


Link to post
Share on other sites

I'm not clear what is not working for you? What are you expecting to happen that is not happening? I see that the cache user credentials are reported as being incorrect. But I also see that they are domain based (not local .\username credentials) so there is nothing for the script to correct, it only reports that the domain account specified for the cache user failed to validate on this machine. You will need to fix the domain based credentials yourself. (If this machine is not domain joined, then you cannot use domain credentials for the cache folder....)

Share this post


Link to post
Share on other sites

Hey Darren.  I am very new to scripting in automate, but i am trying to use your script.  The main thing i want is for this to set a local admin if it is not set or check/change the password if it is not correct.  Most of our clients are part of a domain so the default login as is set as that domain account.  Is there a way to still use the cached username/password and have it set?  We were not using that field, but i did set it for my test computer.  I am getting the cache username or password is missing or invalid.  I guess my question is what do i need to setup to make this work, or will it?

Share this post


Link to post
Share on other sites

Greetings all,  as  newbie... where would I modify the script if wanted to change the Local Admin password to P@$sW0&d#2019? It's my intentions to play w/ the script in our test environment prior to production. 

 

and an all assistance is appreciated. 

 

Sincerely Novice!

Share this post


Link to post
Share on other sites
8 hours ago, rhosey said:

Greetings all,  as  newbie... where would I modify the script if wanted to change the Local Admin password to P@$sW0&d#2019? It's my intentions to play w/ the script in our test environment prior to production. 

The script, as I shared it, was testing the "Location Admin" credentials. You assign the credential using the Location "Deployment and Defaults" tab.
It also tests the "Location Drive" (LTCache) credentials. These are set on the Location "General" tab under the "Script and Template" Username and Password fields.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×