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!

martedì 4 giugno 2013

Windows XP missing Device List

Oggi mi è capitata una cosa strana, pensavo di non uscirne e di dover reinstallare il sistema operativo-

Ho aggiunto una scheda video ad un pc, niente di tale in se'. Se non fosse stato per il fatto che il pc in questione non ne voleva sapere e che il triver falliva l'installazione.


Dopo poco scopro che l'elenco dei device nell'hw manager è vuoto!

Nessun messaggio negli eventi, nessun segnale di malfunzionamento.... La causa ? nel registro di configurazione mancavano i permessi alla chiave 
HKLM\System\CurrentControlSet\Enum
Occorre assegnare a System "Full Control" e a Everyone "Read Only"


lunedì 6 maggio 2013

Configurazione IIS 7 come proxy

Prima occorre installare l'application Request Routing:
http://www.iis.net/learn/extensions/installing-application-request-routing-%28arr%29/install-application-request-routing

Poi seguire gli step qui: 
http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

giovedì 11 aprile 2013

Utili strumenti per la gestione delle ACL in ambiente NTFS

Fino a Windows Vista e 7 lo strumento canonico era CACLS ora esiste ICACLS che offre delle funzionalità di verifica e esportazione utili per la migrazione di filesystem ma probabilmente ancor più utili per il mantenimento delle permission in ambienti dove ci sono più amministratori.

Per la migrazione preferisco sempre Robocoy con il parametro /SEC per la copia delle security NTFS.

mercoledì 3 aprile 2013

SMTP Aperto Alice Business

Sulle linee Telecom Alice business "Impresa Semplice" è possibile utilizzare l'smtp aperto: out.alice.it per inviare mail con altri provider.
Altri Smtp:
out.aliceposta.it
mail.tin.it

giovedì 28 marzo 2013

Citrix Do not display apps in Seamless window with resolution 1920x1080


With new display and network card the resolution sometime go over 1280x1024 this with standard memory assigned to citrix session should cause this message on the event viewer and the appearence of the application non in seameless window, to increase the memory change the parameter below to 8192

With new display and network card the resolution sometime go over 1280x1024 this with standard memory assigned to citrix session should cause this message on the event viewer and the appearence of the application non in seameless window, to increase the memory change the parameter below to 8192



Profile Issues