Question Locked

Why is this logon script getting a syntax error?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am setting a logon script to run when users logon because previously every domain user is a memebr of the local admins group and I don't want that anymore.

The script is:
NET LOCALGROUP Administrators "domain\Domain Users" /DELETE

Where domain is my server domain.

I am trying to test it on my computer and when I logon nothing changes, and when I try to run the vbs on my computer I get an error saying Expected End of statement. Line 1 char 16.

I am new to this and would appreciate any help. Thanks!

2 replies

by mahle

The problem was that I was trying to run the file with a .vbs extension when it should be .bat

This discussion is closed to new replies.