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