Custom Script – Retrieve Local Admins Fails

BatchPatch Forums Home Forums BatchPatch Support Forum Custom Script – Retrieve Local Admins Fails

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13390
    MReece
    Participant

    I am attempting to create a list of Local Administrators on about 300 Windows 10 PCs. I found the link below which appeared to be the perfect fit for this project:

    https://batchpatch.com/incorporating-custom-scripts-in-batchpatch-get-local-administrators-group-membership

    I followed the instructions and then ran the process on 10 test machines. The PC from which I was running the process was included in the test group. Everything appeared to go as expected. The process ran on each PC one after the other. All of the machines returned the “Exit Code: 0 (Success)” message.

    Only one of the machine’s local admin info was populated in the text file and displayed the Local Command Output Log. That was my machine from which I was running BatchPatch.

    The other nine machines info was not updated in the text file. Their Local Command Output Log only displayed “Microsoft (R) Windows Script Host Version 5.812 Copyright (C) Microsoft Corporation. All rights reserved.”

    I have tried numerous tweaks and adjustments without success.

    Any advice or help will be GREATLY appreciated.

    Regards, Mike

    #13391
    doug
    Moderator

    Are you using integrated security or alternate credentials in the rows that connect to target computers? After just looking at the tutorial and script, I think it would only work for integrated security and would not work if the account that is being used to run the BatchPatch.exe does not also have permissions on the target computers.

    We’ll look at updating the tutorial at some point in the future to account for this, but the best workaround right now is to NOT write the output to a single local file (because you won’t be able to with this method), but instead create a BatchPatch deployment that deploys the VBS script to the target computer. In the ‘Deployment’ configuration window check the box that says “Retrieve console output”, and type $computer in the parameters field. Then when you execute the deployment, the script will be copied to the target computer for execution, and the results will be reported in BatchPatch in the ‘Deployment output log’ column.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.