Posts

Showing posts with the label French

HOW TO IMPORT / EXPORT ActiveDirectory User List with Properties (French Characters – UTF8)

HOW TO IMPORT / EXPORT ActiveDirectory User List with Properties (French Characters – UTF8)   1- Export Users to a CSV file from an OU with the following command. (Don’t forget to “import-module ActiveDirectory” when you start PowerShell) Get-ADUser -Filter * -SearchBase "OU=Administrateurs Systeme,OU=Utilisateurs,dc=domain,dc=com" -properties * | Export-Csv C:\AdminSysteme.csv -Encoding UTF8

CHCP – DOS Special Character Problems (CMD Active Codes)

Another “very hard to find” tip… When writing batch files with some special characters like “é” or “à”, you might have surprise errors. Running batch files, with special characters in the code, can cause some serious interpretation problems and your commands might not work at all. Sometimes, you can’t avoid using these characters, like in my case. Because I live in Montréal, Québec (French part of Canada) and there are serious law issues that we have to respect and I think the most difficult part of my job is this language issue. The trick is hidden in this link from Microsoft; http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/chcp.mspx?mfr=true The « chcp » command displays or sets the active code page number is the remedy to your problem. By putting the “chcp 1252” at the beginning of your code, you are changing the “active code” for your cmd environment before even executing your commands in the batch file. The number 1252 is...