I need to allow local administrator access to a few users through BigFix. I executed the following command, but it was completed with exit code=2. After checking the affected machines, I found that the users were not added to the Administrators group. Could you please assist in creating a BigFix package to give the local admin access?
if {(exists (computer name) whose (it as string as lowercase = “hostname1” as lowercase))}
waithidden net localgroup “administrators” “user1@xyz.com” /add /Y
endif
if {(exists (computer name) whose (it as string as lowercase = “hostname2” as lowercase))}
waithidden net localgroup “administrators” “user2@xyz.com” /add /Y
endif
if {(exists (computer name) whose (it as string as lowercase = “hostname3” as lowercase))}
waithidden net localgroup “administrators” “user3@xyz.com” /add /Y
endif