Quantcast
Channel: Directory Services forum
Viewing all articles
Browse latest Browse all 31638

Startup script

$
0
0

Hi, I am from Spain, excuse my bad English

I have a startup script to add domain group to the local administrator group

The script is a vbs script and work fine in the first reboot but in the second reboot the script say that the group is already member of local adminstrator group

How i can add a checking for this issue in the vbs code and avoid this error?

this is my script:

strComputer = "."

Set objAdmins = GetObject("WinNT://" & strComputer & "/Administrators")

Set objGroup = GetObject("WinNT://domain/group")

objAdmins.Add(objGroup.ADsPath)

Thanks for all


Viewing all articles
Browse latest Browse all 31638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>