generate csv file from sims.net import through CC3 MMC 2mins done, all folders, shares, e-mail, printer quotas, disk quotas etc created automatically in AD ready to use immediately thanks RMCC3.

generate csv file from sims.net import through CC3 MMC 2mins done, all folders, shares, e-mail, printer quotas, disk quotas etc created automatically in AD ready to use immediately thanks RMCC3.
...Our lowly paid extra tech!Originally Posted by bossman
:P
hi all,
csvde.exe is the easy part its the setting up a correct excel spreadsheet.
http://www.excel-vba.com/microsoft-e...t-formulas.htm
helped me out no end..
hth.
i have found a really good script here exel bulk add user script
i have modofied it to thishave added userPrincipalName profilePath and displayName have also done one with the user home path as well and it all works really well it is not mine so i cant take no credit but it is a free sample and i have left the creater name in there but it works really well as i get a csv from sims copy and paste forename and sername use exel to create the rest and its done all i donow is copy and paste from csv to exel.' UserSpreadsheet .vbs
' Sample VBScript to create User accounts from a spreadsheet
' Author Guy Thomas http://computerperformance.co.uk/
' Version 4.6 - June 2005
' ------------------------------------------------------'
Option Explicit
Dim objRootLDAP, objContainer, objUser, objShell
Dim objExcel, objSpread, intRow
Dim strUser, strOU, strSheet
Dim strCN, strSam, strFirst, strLast, strPri, strPro, strPWD, strDin
' -------------------------------------------------------------'
' Important change OU= and strSheet to reflect your domain
' -------------------------------------------------------------'
strOU = "OU=Class Two,OU=Students Class, " ' Note the comma
strSheet = "C:\vbstest.xls"
' Bind to Active Directory, Users container.
Set objRootLDAP = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://" & strOU & _
objRootLDAP.Get("defaultNamingContext"))
' Open the Excel spreadsheet
Set objExcel = CreateObject("Excel.Application")
Set objSpread = objExcel.Workbooks.Open(strSheet)
intRow = 3 'Row 1 often contains headings
' Here is the 'DO...Loop' that cycles through the cells
' Note intRow, x must correspond to the column in strSheet
Do Until objExcel.Cells(intRow,1).Value = ""
strSam = Trim(objExcel.Cells(intRow, 1).Value)
strCN = Trim(objExcel.Cells(intRow, 2).Value)
strFirst = Trim(objExcel.Cells(intRow, 3).Value)
strLast = Trim(objExcel.Cells(intRow, 4).Value)
strPri = Trim(objExcel.cells(intRow, 5).Value)
strPro = Trim(objExcel.cells(intRow, 6).Value)
strPWD = Trim(objExcel.Cells(intRow, 7).Value)
strDin = Trim(objExcel.Cells(intRow, 8).Value)
' Build the actual User from data in strSheet.
Set objUser = objContainer.Create("User", "cn=" & strCN)
objUser.sAMAccountName = strSam
objUser.givenName = strFirst
objUser.sn = strLast
objUser.userPrincipalName = strPri
objuser.profilePath = strPro
objuser.displayName = strDin
objUser.SetInfo
' Separate section to enable account with its password
objUser.userAccountControl = 512
objUser.pwdLastSet = 0
objUser.SetPassword strPWD
objUser.SetInfo
intRow = intRow + 1
Loop
objExcel.Quit
WScript.Quit
' End of free example UserSpreadsheet VBScript.
There are currently 1 users browsing this thread. (0 members and 1 guests)