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.

Adding Users Using Script

Featured Replies

OK, I'm back to suck more knowledge from the board.

I've found alot of this script from both microsoft and a couple websites.

My questions is, how do I program it to read the OU name from, say column 1 of an Excel document? Also, if the OU didn't exist, is there a way for it to make it?

Once again, thanks to all those that are so helpful on this board.

Also, is there anything that I'm leaving out that really should be in there?

NOTE: I've not gotten to test any of this out, as I'm working at it at home.

'script to read user information from an Excel File and add them to the domain

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
   ("C:\Scripts\New_users.xls")
intRow = 2
Do Until objExcel.Cells(intRow,1).Value = ""
   Set objOU = GetObject("ou=Data, dc=deployed.af, dc=mil")
   Set objUser = objOU.Create _
       ("User", "cn=" & objExcel.Cells(intRow, 1).Value)
   objuser.userPrincipalName = objExcel.cells(intRow, 9).value
   objUser.sAMAccountName = objExcel.Cells(intRow, 2).Value
   objUser.GivenName = objExcel.Cells(intRow, 3).Value
   objUser.SN = objExcel.Cells(intRow, 4).Value
   objUser.AccountDisabled = FALSE
   objuser.mail = objExcel.cells(intRow, 5).Value


   objUser.SetInfo
   intRow = intRow + 1
Loop
objExcel.Quit


  • Author

Ok, I'm at work now and I've obviously gotten soemthing wrong with the script.

I get the Following error.

Line 8, Char 4, invalid syntax. Code 800401E4, Source (null)

Not sure what I'm doing wrong here if someone can look at the coding, that would be great.

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.