Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script to Add computers to "Log On To.."

Featured Replies

Hello,

I have about 500 users that need access to 3 new servers in our 2003 Windows Server Domain. I am looking for a script that will accomplish this for me. After a brief internet search I found this script. Anyone familiar with VB Scripting could tell me if this will work?

Dim strComputer, objUser, strWorkstations, arrNames, k, objOU

' Bind to user object.
Set objOU = GetObject _
("LDAP://DC=DOMAIN,DC=COM")
objOU.Filter = Array("user")

' Specify NetBIOS name of computer to add.
strComputer = "SERVER1,SERVER2,SERVER3"

For Each objUser in objOU
' Retrieve value of userWorkstations attribute.
strWorkstations = objUser.userWorkstations

' Check if new computer name already included.
arrNames = Split(strWorkstations, ",")
For k = 0 To UBound(arrNames)
If (LCase(strComputer) = LCase(arrNames(k))) Then
' This computer already included. Abort.
Wscript.Echo "User already allowed to logon to " & strComputer
End If
Next

' Append new computer name.
If (strWorkstations = "") Then
strWorkstations = strComputer
Else
strWorkstations = strWorkstations & "," & strComputer
End If

' Save new value.
objUser.userWorkstations = strWorkstations
objUser.SetInfo

Next

Edited by bbbngowc

  • Author

I made some small modifications to the script and ran it. It works. Thanks for looking.

  • 1 month later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.