I am interested in adding a domain group to a local admin account through a script. I found a script that does this but it only does one computer at a time, I am looking to do more than that. I have pasted the script below:
strComputer = "atl-ws-01"
Set objAdmins = GetObject("WinNT://" & strComputer & "/Administrators")
Set objGroup = GetObject("WinNT://fabrikam/accounting")
objAdmins.Add(objGroup.ADsPath)
Is there any way to make this script pull from a txt file with a list of computers, maybe delineated by commas or returns? I know you can use the FileSystemObject funstion but not sure how to incorporate it. I don't really feel like running this manually 400 times
Thanks for the help.
DG
strComputer = "atl-ws-01"
Set objAdmins = GetObject("WinNT://" & strComputer & "/Administrators")
Set objGroup = GetObject("WinNT://fabrikam/accounting")
objAdmins.Add(objGroup.ADsPath)
Is there any way to make this script pull from a txt file with a list of computers, maybe delineated by commas or returns? I know you can use the FileSystemObject funstion but not sure how to incorporate it. I don't really feel like running this manually 400 times
Thanks for the help.
DG