Automatise Adduser for Windows Active Directory 2008 - windows

I would like to add a lot of users into my Active Directory Users Group based on a csv with specifics informations like phone numero, email, job ...
I look around the internet and found a "method" using powershell. But, it's always to add basic infos like Name, Surname, Login and password.
Is there a webpage referencing the New-ADuser cmd ?
I found something on this website
http://blogs.technet.com/b/pascals/archive/2013/08/09/cr-233-er-des-utilisateurs-de-test-dans-ad-avec-un-mini-script-powershell.aspx
Thanks,

I usually use the Quest AD cmdlets which makes easier the AD manipulation.
You can download the cmdlets from here.
You can also add phone number, webpage, etc. by default, or you can use the -IncludedProperties for addition.
Here is the syntax for the new user creation.

Related

Hide username completely while the machine is auto logging in

I have a unique requirement, I have setup a PC which would auto login to a particular user id say 'autologinuser', when ever we switch on the PC it would automatically logs into 'autologinuser' as configured.
During the login, it would show which using is getting logged in with welcome text under it.
I would like to hide the user name and don't want to visible during auto login process, only windows text should be visible.
Can this be possible?
Thanks & Regards,
-Anil Katta
Looks like windows operating system don't provide this feature at this point of time, and there is no specific registry to do so.
May be this feature good to expect in future releases.

Active Directory Search query buid

I am trying to find a list of users that are DISABLED ( no locked )
This users must have a home folder mapped and the folder starts with \\userdatasrv\
I manged to find the custom filter for the home folder:
(&(objectCategory=user)(objectClass=user)(homeDirectory=\5c\5cuserdatasrv*))
also I found some examples for disabled users on the internet but I can't make them work together.
Please advise.
Thank you.
I think you should be able to use a search filter that looks something like this:
(&(objectCategory=person)(objectClass=User)(userAccountControl:1.2.840.113556.1.4.803:=2)(homeDirectory=\5c\5cuserdatasrv*))
Also remember to use objectCategory person. The objectCategory for a user object is not user it is person and objectClass is not enough since computer class is a sublclass of user. objectCategory will give you both user objects and contact objects.
This will only include accounts that are disabled. For more information about using bitwise filters see this page: http://support.microsoft.com/kb/269181

How to write script to download csv file of ideas for product category in google adwords

I want download search volume trends from google adwords based on the target location and product category. Can Someone guide me to write a script that can automate the process.
If download is not possible, let it share to my google drive account with the specified name(category name)
Edit:
I am trying to automate the below process for an Adwords - Keyword planner.
Login to adwords
Select Target location
Input Category and click on Get Ideas
Downloading the keyword ideas as CSV and save it.
Something like a PHP bot
Since you're considering
to write a script that can automate the process
One way this can be done, is via PowerShell's WebClient. And it's .DownloadFile Method (String address, String fileName). The scripts (Cmdlets) actually are specialized .NET classes, which the PowerShell runtime instantiates and invokes when they are run. Cmdlets derive either from Cmdlet or from PSCmdlet, the latter being used when the cmdlet needs to interact with the PowerShell runtime. Also The implementation of these cmdlet classes can refer to any .NET API and may be in any .NET language.

LDAP or VBscript to list all real users in AD

Please can you help me with a LDAP query or VBscript to list all current users; real, flesh and blood people so it must exclude service accounts, administrator accounts and shared mailboxes.
If you can help with this, it would be greatly appreciated.
How do you know (in your script) whether an account is a "flesh-and-blood" account or a service account?? What attribute can you check to make that decision?? I'm not aware of any "real user" flag in AD - but maybe you can base your decision on something that your company is using.
Once you know that fact, then you should be able to find something on Richard Mueller's website - he has tons of examples for VBScript and Active Directory - this page here has a number of premade VBScripts to handle things like creating a list of users and many others. Adapt these for your specific needs.
I know this is an old one, anyway... to get "flesh-and-blood" :) account, try this:
Users who are persons AND company and email address cannot be blank AND the manager field cannot be blank:
(&(objectCategory=person)(objectClass=user)(company=*)(mail=*)(|(manager=*)))
... or this to:
Users who are persons AND company and email address cannot be blank AND the manager field cannot be blank unless the user’s name is Mr. Brown:
(&(objectCategory=person)(objectClass=user)(company=*)(mail=*)(|(manager=*)(name=Mr. Brown)))
Note: The operation (|(manager=*)(name=Mr. Brown)) means that either manager=* or name=Mr. Brown must be true.
Source: https://help.mypurecloud.com/articles/create-ldap-query/

Windows / Active Directory - User / Groups

I'm looking for a way to find a the windows login associated with a specific group. I'm trying to add permissions to a tool that only allows names formatted like:
DOMAIN\USER
DOMAIN\GROUP
I have a list of users in active directory format that I need to add:
ou=group1;ou=group2;ou=group3
I have tried adding DOMAIN\Group1, but I get a 'user not found' error.
P.S. should also be noted that I'm not a Lan admin
Programatically or Manually?
Manually, i prefer AdExplorer, which is a nice Active directory Browser. You just connect to your domain controller and then you can look for the user and see all the details. Of course, you need permissions on the Domain Controller, not sure which though.
Programatically, it depends on your language of couse. On .net, the System.DirectoryServices Namespace is your friend. (I don't have any code examples here unfortunately)
For Active Directory, I'm not really an expert apart from how to query it, but here are two links I found useful:
http://www.computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm
http://en.wikipedia.org/wiki/Active_Directory (General stuff about the Structure of AD)
You need to go to the Active Directory Users Snap In after logging in as a domain admin on the machine:
Go to start --> run and type in mmc.
In the MMC console go to File -->
Add/Remove Snap-In Click Add Select
Active Directory Users and Computers and select Add.
Hit Close and then hit OK.
From here you can expand the domain tree and search (by right-clicking on the domain name).
You may not need special privileges to view the contents of the Active Directory domain, especially if you are logged in on that domain. It is worth a shot to see how far you can get.
When you search for someone, you can select the columns from View --> Choose Columns. This should help you search for the person or group you are looking for.
You do not need domain admin rights to look at the active directory. By default, any (authenticated?) user can read the information that you need from the directory.
If that wasn't the case, for example, a computer (which has an associated account as well) could not verify the account and password of its user.
You only need admin rights to change the contents of the directory.
I think it is possible to set more restricted permissions, but that's not likely the case.
OU is an Organizational Unit (sort of like a Subfolder in Explorer), not a Group, Hence group1, 2 and 3 are not actually groups.
You are looking for the DN Attribute, also called "distinguishedName". You can simply use DOMAIN\DN once you have that.
Edit: For groups, the CN (Common Name) could also work.
The full string from Active Directory normally looks like this:
cn=Username,cn=Users,dc=DomainName,dc=com
(Can be longer or shorter, but the important bit is that the "ou" part is worthless for what you're trying to achieve.
Well, AdExplorer runs on your Local Workstation (which is why I prefer it) and I believe that most users have read access to AD anyway because that's actually required for stuff to work, but I'm not sure about that.
Install the "Windows Support Tools" that is on the Windows Server CD (CD 1 if it's Windows 2003 R2). If your CD/DVD drive is D: then it will be in D:\Support\Tools\SuppTools.msi
This gives you a couple of additional tools to "get at" AD:
LDP.EXE - good for reading information in AD, but the UI kinda stinks.
ADSI Edit - another snap-in for MMC.EXE that you can both browse AD with and get to all those pesky AD attributes you're looking for.
You can install these tools on your local workstation and access AD from there without domain admin privileges. If you can log on to the domain, you can at least query/read AD for this information.
Thanks adeel825 & Michael Stum.
My problem is, though, i'm in a big corporation and do not have access to log in as the domain admin nor to view the active directory, so i guess my solution is to try and get that level of access.

Resources