Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Install software if computername contains "teacher"


Recommended Posts

Posted

Ive got a few bits of software that need installing and tbh i thiink the best way is by a script looking for "teacher" in the computername.

 

Problem is im not sure how to do it. Guess VBS would be best. I know how to make it look for "x" in the last y charcters but not to simpley search the name.

 

Any ideas?

 

:beer:

  • 2 months later...
Posted

It depends on the environment. If you are in Active Directory then I would either put all of your teacher's computers in a particular OU or put the teacher computers in a group and filter a group policy so that it only affects computers in that security group. Or as Geoff suggested using filters on your GPOs works just as well.

 

If you have questions about how to do that, let me know and I can score you some links.

 

If you need to grab the computer name here it is:

Set WshNetwork = WScript.CreateObject("WScript.Network")

WScript.Echo "Computer Name: " & WshNetwork.ComputerName

 

Happy hunting and have a great day.

Posted

WMI filter?

 

"SELECT * FROM Win32_ComputerSystem WHERE Name = '*teacher*'

 

Not sure if the wild cards will work but it's a starting point for you.

 

Ben

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...