Visualizzazione post con etichetta active directory. Mostra tutti i post
Visualizzazione post con etichetta active directory. Mostra tutti i post

lunedì 1 luglio 2013

Simple Bulk User Creation in AD Using powershell

After some testing I found the easiest way to bulk create users in AD using: powershell new cmdlet and some DSQUERY & DSMOD commands.

First of all create an excel file with this header columns: 
Name,Display Name,Description,sAMAccountName,given Name,Surname,Title,physicalDeliveryOfficeName,
OfficePhone,givenName,displayName,Company,
department,userPrincipalName,Path,
EmailAddress,City,State,Enabled,Country

Fill the excel file with your users detail. 

Notes:
userPrincipalname: usually I put name.surname@domain.local
State: is the "state/province" field in AD Gui
Country: is the combo box Country/Region, this field must be in form "US" for usa or "IT"for Italy.
Path: is the Distinguisced Name of the Organizational Unit inside your forest so must be in form "OU=my users, DC=test,DC=local"



The colums are not all mandatory but this list fill almost all the useful fileds for users.


Then export the file as CSV, if your operating system is not english you should remember to change the field separator to a comma. In my italian version of excel the field separator is: ";" or use the -delimiter ";" switch on the command line.
When you export from excel correct the " sign in the csv should be in the form: 
"""

Done that connect to your w2008 DC and  execute the "Active Directory Module for Windows PowerShell" from Administrative tools or a normal power shell console but remember to import module ActiveDirectory

Then if your CSV file was done correctly run: 
Import-Module ActiveDirectory
import-CSV | New-ADUser 

You should see after a refresh the new created users in the path you selected. I suggest to use a temporary OU set adhoc for that (see below)

Unfortunately the field AccountPassword do not set corrctly the password so the easiest way to change is to run: 
DSQUERY user "OU=MyNewUsers,OU=MyCompanyAccount,DC=mydomain,DC=local" | DSMOD user -pwd

That's IT!

mercoledì 23 gennaio 2013

IIS 6 e Windows 2008 UPN authentication

Oggi, mio malgrado ho scoperto che l'autenticazione UPN cioè nella forma nomeutente@nomedominio non funziona su II6 (windows 2003) con domain controller windows 2008 R2.

Per risolvere è necessario installare questo aggiornamento:http://support.microsoft.com/kb/956114


giovedì 29 novembre 2012

Disabilitare User Access Control su un domain controller Windows 2008 R2

Oltre che a disabilitare questa feature via group policy è anche possibile disabilitarla modificando questa chiave del registro con il comando sotto riportato:

runas /user:DOMAIN\youraccount 
"REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f"

venerdì 23 novembre 2012

Servizio NTP su windows 2003 e 2008 domain controllers

Il comando provato più volte e funzionante per configurare il servizio ntp per i domain controller e altri server verso il pdc è: 

w32tm /config /manualpeerlist: /reliable:yes

poi riavviare il servizio ntp: 
sc stop w32time 
sc start w32time

Se questo post ti è stato utile commentalo ;)