VBS on specific computers

Want to have a login script that runs on all computers but you still want to omit servers?

Here is something I came up with.

Dim strOS
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
'    Wscript.Echo objOperatingSystem.Caption & _
'    "  " & objOperatingSystem.Version
strOS = objOperatingSystem.Caption

exists = InStr (strOS, "Server")
If exists = 0 Then
	'Run the script for Workstations or SKIP
	'Run the script for Servers or SKIP
End If

This will detect if the string/word Server is in the OS name. Run as needed hope this helps