<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Windows Server Administration &#187; Active Directory</title>
	<atom:link href="http://www.msserveradmin.com/category/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.msserveradmin.com</link>
	<description>Server Administration Articles and Tips for Network Admins</description>
	<lastBuildDate>Wed, 04 Mar 2009 03:10:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting Default Printers with Group Policy Preferences</title>
		<link>http://www.msserveradmin.com/deploy-printers-via-group-policy/</link>
		<comments>http://www.msserveradmin.com/deploy-printers-via-group-policy/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 02:03:55 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=453</guid>
		<description><![CDATA[

Had an interesting question from a reader in response to setting a default printer with Group Policy Preferences that I thought I would share.
Question was:
If you set a user general default printer like the main office copier but also set a location printer preference like the library copier using the loop back policy will it [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; margin:5px;">
<a href="http://www.msserveradmin.com/wp-content/uploads/2009/02/grouppolicy.jpg"><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/grouppolicy-300x172.jpg" alt="grouppolicy" title="grouppolicy" width="300" height="172" class="aligncenter size-medium wp-image-459" /></a></div>
<p>Had an interesting question from a reader in response to <a href="http://www.msserveradmin.com/the-one-reason-you-should-use-group-policy-preferences/">setting a default printer with Group Policy Preferences</a> that I thought I would share.</p>
<p>Question was:<br />
<em><strong>If you set a user general default printer like the main office copier but also set a location printer preference like the library copier using the loop back policy will it over ride the general default printer preference?</p>
<p>Do I merge or replace?</strong></em><br />
<span id="more-453"></span></p>
<p>I decided to test this out as I have not come across this. Here is what I found, if you have a User Policy that is creating a printer connection and setting it as the default and you also have, using <strong>Loopback Policy Processing</strong> in <strong>Merge Mode</strong>, another User Policy being applied, this will override the first User Policy Settings. Both printers will be installed, but the default printer will be set to the one specified in the policy that has the loopback.</p>
<p><strong>Note:</strong> I tested this on a client that has no printers installed</p>
<p>If Loopback Processing is in Replace Mode then the User Settings in that policy will <strong>&#8220;Replace&#8221;</strong> the settings in the other policy. Therefore only one printer will be installed and it will be set as default.</p>
<p>Hope that helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/deploy-printers-via-group-policy/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using Group Policy Prefernces to Map Drives</title>
		<link>http://www.msserveradmin.com/using-group-policy-prefernces-to-map-drives/</link>
		<comments>http://www.msserveradmin.com/using-group-policy-prefernces-to-map-drives/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 00:38:43 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=439</guid>
		<description><![CDATA[The other day I wrote an article on how I use Group Policy Preferences to Deploy Printers and Set the Default Printer. Today I wanted to share with you how I go about mapping network drives to particular users based on their AD DS Group Memberships. In days gone by this was don via a [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I wrote an article on how I use <a href="http://www.msserveradmin.com/the-one-reason-you-should-use-group-policy-preferences/">Group Policy Preferences to Deploy Printers and Set the Default Printer</a>. Today I wanted to share with you how I go about mapping network drives to particular users based on their AD DS Group Memberships. In days gone by this was don via a vbs login in script, but let me show you how this can be done via GPP.</p>
<p>Simple scenario, we have a group of Media students that need a drive mapped to a different &#8220;Media Backup Server&#8221;, so what I have done is put these students into and Active Directory Group called &#8220;Media Students&#8221;.</p>
<p>So in my Students GPO I simply went to <strong>User Configuration > Preferences > Windows Settings > Drive Maps</strong></p>
<p><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/mapped_drives1.png" alt="mapped_drives1" title="mapped_drives1" width="220" height="301" class="aligncenter size-full wp-image-441" /><br />
<span id="more-439"></span><br />
Right Click Drive Maps and select <strong>New > Mapped Drive</strong> Select Create from the drop down menu, enter the path to the share (eg. \\server\share ), I have created folders that relate to the students username therefore I used the %username% variable, select the Drive Letter.</p>
<p><a href="http://www.msserveradmin.com/wp-content/uploads/2009/02/new_drive.png"><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/new_drive-271x300.png" alt="new_drive" title="new_drive" width="271" height="300" class="aligncenter size-medium wp-image-444" /></a></p>
<p>Then from the Common tab up the top tick <strong>Item Level Targeting</strong>, from the New Item Menu select <strong>Security Group</strong>, make sure User In Group is selected in the bottom window and browse for the Security Group that the user must be a member of.</p>
<p><a href="http://www.msserveradmin.com/wp-content/uploads/2009/02/item_targeting.png"><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/item_targeting-300x218.png" alt="item_targeting" title="item_targeting" width="300" height="218" class="aligncenter size-medium wp-image-445" /></a></p>
<p>All Done, now all students that are a member of the Media Security Group will get an M Drive Mapped.</p>
<p>Cheers</p>
<p>Daniel Anderson<br />
<strong>Loving Group Policy Preferences</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/using-group-policy-prefernces-to-map-drives/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The One Reason You Should Use Group Policy Preferences</title>
		<link>http://www.msserveradmin.com/the-one-reason-you-should-use-group-policy-preferences/</link>
		<comments>http://www.msserveradmin.com/the-one-reason-you-should-use-group-policy-preferences/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 04:38:01 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=421</guid>
		<description><![CDATA[The job of deploying printers and setting default printers has been quite simply a pain in the butt. Well automating the default printer has been anyway. Now if you are like me and work in an educational environment where there are computer labs, left right and center, libraries, staff notebooks (separated on different campuses), student [...]]]></description>
			<content:encoded><![CDATA[<p>The job of <strong>deploying printers</strong> and <strong>setting default printers</strong> has been quite simply a pain in the butt. Well automating the default printer has been anyway. Now if you are like me and work in an educational environment where there are computer labs, left right and center, libraries, staff notebooks (separated on different campuses), student notebooks etc etc and users all wanting to print to specific printers and of course people not wanting to select the correct one from a list of printers then read on.</p>
<h2>Use Group Policy Preferences !!!</h2>
<p>In the past I have used the Print Management Console to deploy the printers via Group Policy, now that did work very well, but there was still the <strong>&#8220;overlooked&#8221;</strong> problem of being able to set the default printer. To get around this what I used to do was to name the computers in a certain way and then have a vbs script that would get the name of the printer and then set the default based on the computer name.</p>
<p>I was reading an article by GPO Guru Derek Melber about the new <a href="Windows Server 2008 and Windows Vista brought">Group Policy Preferences that come with Windows Server 2008 and Windows Vista</a> and thought I would explore this option. </p>
<p>To start off your client will need the Group Policy Preference Client Side Extensions both <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=e60b5c8f-d7dc-4b27-a261-247ce3f6c4f8&#038;displaylang=en">XP </a>and <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ab60dc87-884c-46d5-82cd-f3c299dac7cc&#038;displaylang=en">Vista Clients</a> need these. Now you can manually download these and install via a computer startup script via Group Policy or if you have a WSUS Server then you can make this <strong>&#8220;Feature Pack&#8221;</strong> available via Windows Updates (this is the option I took, less work!).</p>
<p>Now that you have the Group Policy Preference Client Side Extensions installed on the clients, you can go ahead and play with the GPO&#8217;s. If you open up the Group Policy Management snap in and edit a GPO object you will see &#8220;Preferences&#8221;</p>
<p><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/gpopreferences.jpg" alt="gpopreferences" title="gpopreferences" width="281" height="296" class="aligncenter size-full wp-image-424" /></p>
<p><span id="more-421"></span><br />
After expanding &#8220;Preferences&#8221; you will notice an options there that says PRINTERS. If you right click on Printers and select New > Shared Printer, the New Shared Printer Dialog Box will appear.</p>
<p><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/sharedprinter.jpg" alt="sharedprinter" title="sharedprinter" width="411" height="460" class="aligncenter size-full wp-image-426" /></p>
<p>From here we can enter in the path to the shared printer and from the Action drop down menu select &#8220;Create&#8221;, but the best part is that you can place a tick in the <strong>&#8220;Set this printer as the default printer&#8221;</strong> box and it will make that printer the default. Interesting thing to note here though is that this check box is only available under a User Configuration and not the Computer Configuration. This is not what I wanted, I need to set a default printer for computers in a specific room.</p>
<p>So what I have done in enable <strong>User Group Policy Loop Back Processing</strong> under the <em>Computer Configuration > Policies > Admin Templates > System > Group Policy</em>, you can either set that to Merge or Replace. Now what that does is enable you to apply User Configurations to users that log onto those computers that this policy applies to.</p>
<h2>This is the Good Part</h2>
<p>Once you have created a shared printer to deploy there is a tab on the properties of that called <strong>&#8220;Common&#8221; </strong>, if you click on that and place a tick in the &#8220;Item Level Targeting&#8221; and click on the Targeting Button <strong>a whole new world opens up!</strong></p>
<p><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/itemleveltargeting.jpg" alt="itemleveltargeting" title="itemleveltargeting" width="404" height="427" class="aligncenter size-full wp-image-430" /></p>
<p>Click on the New Item and just have a look at the possibilities there. The one I was interested in was the Organisational Units option. Because what I want to happen is if a computer is in a specific OU install and make printer X the default.</p>
<p><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/targeting-93x300.jpg" alt="targeting" title="targeting" width="93" height="300" class="aligncenter size-medium wp-image-431" /></p>
<p>With this option I was able to achieve just that. Just select the OU that the Computer should belong to by using the Browse Button and select the Computer in OU radio box.</p>
<p><img src="http://www.msserveradmin.com/wp-content/uploads/2009/02/targetou-300x207.jpg" alt="targetou" title="targetou" width="300" height="207" class="aligncenter size-medium wp-image-433" /></p>
<p>Job Done&#8230;&#8230;</p>
<p>For More Tips on how you can use Group Policy Preferences make sure you <a href="feeds2.feedburner.com/msserveradmin">SUBSCRIBE to my RSS Feed</a> so you don&#8217;t miss out on making your life as a Network Administrator an easier one !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/the-one-reason-you-should-use-group-policy-preferences/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Secure Your Wireless Network With WPA2-EAP</title>
		<link>http://www.msserveradmin.com/secure-your-wireless-network-with-wpa2-eap/</link>
		<comments>http://www.msserveradmin.com/secure-your-wireless-network-with-wpa2-eap/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 00:37:04 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=253</guid>
		<description><![CDATA[I have been reading a bit about wireless security over the past week, as it is part of the 70-642 MCTS Exam &#8220;Configuring Windows 2008 Network Infrastructure&#8221; that I am currently studying (I will be sitting the exam in the next week or two, so subscribe to my RSS Feed so you don&#8217;t miss out [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reading a bit about wireless security over the past week, as it is part of the <a href="http://www.microsoft.com/learning/en/us/exams/70-642.mspx">70-642 MCTS Exam</a> <strong>&#8220;Configuring Windows 2008 Network Infrastructure&#8221;</strong> that I am currently studying (I will be sitting the exam in the next week or two, so subscribe to my <a href="http://feeds.feedburner.com/MsServerAdmin">RSS Feed</a> so you don&#8217;t miss out on some inside tips !!!). We are curently running a wireless infrastructure with <a href="http://www.cisco.com/en/US/products/hw/wireless/ps430/">Cisco 1200 Access Points</a>, a Windows 2003 Radius Server and using WEP 128bit (keys auto rotated every hour) encryption and Auto Enrolled Certificates from our Windows 2003 CA for authentication. This has been working pretty well, but with WPA2, an updated version of WPA and comes in two flavours WPA2-PSK and WPA2-EAP, it offers improved security and better protection from attacks. Now if all clients can support WPA2-EAP then this <strong>should be</strong> your first choice.</p>
<p>To kick things off you first of all need a <strong>PKI Infrustructure</strong> and enable autoenrollment so that all your wireless clients obtain the correct certificates for the authentication process.</p>
<p><strong>1.</strong> Install the <strong>Active Directory Certificate Services (ADCS)</strong> Role to the server and just use the default settings here.</p>
<p><strong>2.</strong> Next Open up the Group Policy Management Console and either edit a policy or create a new one to apply the wireless settings to your clients. The section we want is <strong>Computer Configuration\Policies\Windows Settings\Security Settings\Public Key Policies</strong>. In the details pane now you need to right click the Certificate Services Client &#8211; Autoenrollment and then select properties. In the Properties dialog box select enabled from the rop down box and then place a tick in the other boxes, which is optional.<br />
<span id="more-253"></span><br />
Let&#8217;s now install and configure the <strong>Radius Server</strong> to handle the authentication. Install the Network Policy and Access Services Role. Once install you need to then navigate to the NPS Node in Server Manager, under Roles\Network Policy and Access Services.</p>
<p><strong>1.</strong> In the Details Pane, from the drop down list under <strong>Standard Configuration</strong> select RADIUS server for 802.1x Wireless or Wired Connections and click Configure 802.1X Hyperlink.</p>
<p><strong>2.</strong> Select the top radio button <strong>&#8220;Secure Wireless Connections&#8221;</strong> click next</p>
<p><strong>3.</strong> On the <strong>Specify 802.1X Swtiches</strong> Page Add your Wireless Access Points and Radius Clients. You need to do this for each Access Point you have. When you click the add button fill out the Friendly Name, IP Address. For the Shared Seceret you can either enter one in manually or have one generated (which will then need to be entered into the AP&#8217;s), once all AP&#8217;s have been entered click next.</p>
<p><strong>4.</strong> Next up Configure an <strong>authentication method</strong>. From the Drop Down list select the method you want to use. We were currently using Smart Card or Other Certificate and I wanted to change to Microsoft: Protected EAP (PEAP).</p>
<p><strong>NOTE:</strong> This method requires a Computer Certificate and the Radius Server and either a computer or user certificate on the client machine. The best way to do this is to use a Domain PKI see above.</p>
<p><strong>5.</strong> Select the groups you would like to give wireless access to.</p>
<p><strong>6.</strong> Next configure VLAN Settings. You can use this to restrict Wireless users to specific network resources. Then click Finish.</p>
<p><strong>7.</strong> You then need to Reegister the server with <a href="http://www.msserveradmin.com">Active Directory</a>. Right Click the NPS Node and select Register Server.</p>
<p><strong>Configure Wirelss Clients to Connect Automatically&#8230;&#8230;</strong></p>
<p><strong>1.</strong> There are a couple of Group Policy settings that you will need to adjust here to get your wireless clients to automatically connect to your network. Open up your Group Policy Management Console and navigate and right click <strong>Computer Configuration\Policies\Windows Settings\Security Settings\Wireless Network (IEEE 802.11)</strong> and select Create A New XP Policy. If you have both XP and Vista Clients then you will need to select this option as if there is no Vista Policy, Vista Clients will use the XP one.</p>
<p><strong>2.</strong> Give the Policy a Name and Description and then click the Preferred Networks Tab. Click the Add Button and select Infrastructure.</p>
<p><strong>3.</strong> Enter the SSID of your Wireless Network, then from the Authentication drop down box select <strong>WPA2 </strong>and from the enryption drop down box select <strong>TKIP</strong>.</p>
<p><strong>4.</strong> Then click on the <strong>IEEE 802.1X</strong> Tab leave the EAP Type and PEAP and under Authentication Mode selct Computer Only. This means that the authentication will take place prior to the Computer getting to the Login Screen. This is what I wanted.</p>
<p><strong>Auto Enrolling Computer Certificates Via Group Policy</strong></p>
<p>The process above regarding the PKI Infrastrucure will auto enroll the Root Cert. But we also need to auto enroll a computer certificate which can be done like this.</p>
<p><strong>1. </strong>Open up your Group Policy Management Console and navigate to <strong>Computer Configuration\Policies\Windows Settings\Security Settings\Public Key Policies\Automatic Certificate Request Settings.</strong></p>
<p><strong>2. </strong>Right Click in the details pane and select New > Automatic Certificate Request.</p>
<p><strong>3. </strong>This will open up a wizard and you can select a Computer Certificate.</p>
<p>Now do a <strong>policy update</strong> on your client machines and they SHOULD automatically connect to your newly secured wireless network.</p>
<p>Hope this helps you out. Cheers</p>
<p>Daniel<br />
Securing My Wireless Network</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/secure-your-wireless-network-with-wpa2-eap/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To Migrate User Home Directories with RoboCopy</title>
		<link>http://www.msserveradmin.com/how-to-migrate-user-home-directories-with-robocopy/</link>
		<comments>http://www.msserveradmin.com/how-to-migrate-user-home-directories-with-robocopy/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 03:13:38 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=170</guid>
		<description><![CDATA[Here is a task that most Network Administrators will face at one time or another, moving User Home Directories from one Server to another. We are in the process of organising new Servers for 2009 and these will be Windows Server 2008 and the current Servers are running on Windows 2003 Server Standard Edition. Now [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a task that most Network Administrators will face at one time or another, moving User Home Directories from one Server to another. We are in the process of organising new Servers for 2009 and these will be Windows Server 2008 and the current Servers are running on Windows 2003 Server Standard Edition. Now currently our Home Folders are <strong>individually shared as hidden shares</strong>, and I want to move to a convention of a parent shared User Folder with individual folders for each user in there that are not shared.<br />
<br />
Now I wanted to explore the <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">PowerShell </a>option to copy from the source server to the destinsation server and keep the NTFS Permissions intact after the copy, as I have previosuly used PowerShell to do a <a href="/how-to-use-powershell-to-bulk-import-users-into-active-directory/">bulk import of users into Active Directory</a> and that woked a treat. I was a bit dissapointed with the PowerShell options using GET-ACL and SET-ACL because I could do individual folders one at a time but that would take forever, and I couldn&#8217;t see an easy way to iterate through them&#8230;.<br />
<br /><span id="more-170"></span><br />
Enter <strong>ROBOCOPY</strong>&#8230;&#8230;<br />
<br />
Now with ROBOCOPY I can copy all the User Directories that already have the correct NTFS File Permissions set, to the New Windows 2008 Server and keep these permissions in tact. Below is the RoboCopy string that I used.<br />
<br />
<em>robocopy.exe \\source_server\share\  C:\Users /E /SEC /COPYALL /V /ETA /TEE /ITEM </em><br />
<br />
Now the thing to consider here is the Share Permissions and the File Permissions of the Parent Folder eg. Users. The Share Permissions that I set were as follows, Domain Admins &#8211; Full Control, Staff &#8211; Full Control, Students &#8211; Read Only. The NTFS (File Permissions) were as follows, Domain Admins, Ent Admins and Staff &#8211; Full Control. This will mean that all the new User Accounts that we create after the copy process will inherit these permissions also and Active Directory will assign the user permissions automatically once the Home Directory Path is set in the Profile Tab of the User Account Object.<br />
<br />
Eventhough Students have Read Access to the parent share the can&#8217;t access it and get the <strong>&#8220;Access Denied&#8221;</strong> Message is they try. Meaning that they can&#8217;t get into anyone elses Home Directories. The next step was to change the Home Directory path in their Account Profile and Bingo all done.<br />
<br />
Hope this helps a few of you out when it comes time to Migrate User Home Directories from one server to another.<br />
<br />
Make Sure you <a href="http://feeds.feedburner.com/MsServerAdmin">SUBSCRIBE to the RSS Feed</a> to keep updated. <strong>ALSO </strong>I know have a <em><strong>&#8220;The Network Administrators Newsletter&#8221;</strong></em> so pop your Email Address in the box on the right and get some more great tips, tricks and how &#8211; to&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/how-to-migrate-user-home-directories-with-robocopy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Use PowerShell to Bulk Import Users into Active Directory</title>
		<link>http://www.msserveradmin.com/how-to-use-powershell-to-bulk-import-users-into-active-directory/</link>
		<comments>http://www.msserveradmin.com/how-to-use-powershell-to-bulk-import-users-into-active-directory/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 00:20:00 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows Server 2008]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=97</guid>
		<description><![CDATA[Well it is coming to that time of year again where we will be given a list of new students that will be enrolled for the 2009 School Year, and of course it is up to the IT Department to created the hundreds of accounts. This year I thought I would have a crack at [...]]]></description>
			<content:encoded><![CDATA[<p>Well it is coming to that time of year again where we will be given a list of new students that will be enrolled for the 2009 School Year, and of course it is up to the IT Department to created the hundreds of accounts. This year I thought I would have a crack at using PowerShell to do a bulk import into Active Directory.<br />
<br />
The first thing that I found was that PowerShell doesn&#8217;t have any specific Active Directory CMDLets, so I found these <a href="http://www.quest.com/powershell/activeroles-server.aspx">PowerShell CMDLets from Quest</a>. A must have if you are working with Active Directory and PowerShell. There are a few pre requesests before installing so grab the PDF document associated and have a read. Let&#8217;s build the script!<br />
<br />
I want to be able to import users from a CSV file so the the cmdlet that I amm interested in is <strong>Import-CSV</strong> which takes a parameter for the file name like so:<br />
<br />
<strong>Import-CSV C:\New.csv</strong><br />
<br />
Next Step is to iterate through the file. This is done by piping the contents of the csv file to the <strong>For-EachObject</strong> cmdlet which inturn uses the <strong>New-QADUser</strong> cmdlet.<br />
<br />
<em>ForEach-Object {New-QADUser -ou domain.local/Students/2009 -name $_.Name -Description $_.Description -City $_.City -UserPassword $_.Password -SamAccountName $_.sAMAccountName -FirstName $_.FirstName -LastName $_.LastName -DisplayName $_.Name -UserPrincipalName $_.UPN}</em><br />
<br />
If you type in <strong>get-help New-QADUser</strong> you will see the syntax and all the parameters you can include. In the above script you will see <strong>$_.Name</strong> etc etc. These correlate to the CSV File. My CSV File had Name, Description, UserPassword, sAMAccountName, FirstName, LastName, DispplayName and UPN. You can see the connection above. It doesn&#8217;t even matter what order they are in in the CSV File!<br />
<br />
Did you Like This Post? Stay Updated with more <a href="http://feeds.feedburner.com/MsServerAdmin">How To&#8217;s and Tips by Subscribing to My RSS Feed</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/how-to-use-powershell-to-bulk-import-users-into-active-directory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable Inactive Active Directory User Accounts</title>
		<link>http://www.msserveradmin.com/disable-inactive-active-directory-user-accounts/</link>
		<comments>http://www.msserveradmin.com/disable-inactive-active-directory-user-accounts/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 04:23:51 +0000</pubDate>
		<dc:creator>Daniel Anderson</dc:creator>
				<category><![CDATA[Active Directory]]></category>

		<guid isPermaLink="false">http://www.msserveradmin.com/?p=57</guid>
		<description><![CDATA[Let me first start by saying that we have a pretty unorginsaeed Active Directory Structure at the moment, but that will change. Today I took the first step to getting some order in our AD Structure, disable all accounts that ahve been inactive for a period of time. To do this I simply used DSQuery [...]]]></description>
			<content:encoded><![CDATA[<p>Let me first start by saying that we have a pretty unorginsaeed Active Directory Structure at the moment, but that will change. Today I took the first step to getting some order in our AD Structure, disable all accounts that ahve been inactive for a period of time. To do this I simply used <strong>DSQuery</strong> and piped the results to <strong>DSMod</strong> and there we have it all the accounts are disabled.</p>
<p>Here was the command I used:<br />
<br />
<strong>dsquery user -inactive 40 -limit 0 | dsmod user -disabled yes</strong><br />
<br />
I know, I know pretty simple but something that is good to have in the tool kit. I then went on and did it using the computer accounts. Then from <a href="http://www.msserveradmin.com">Active Directory</a> Users and Computers snap in I could then create a query to lookup all the disabled user and computer account and eother delete them or move them to a temp OU before deleting.<br />
<br />
<strong>Daniel Anderson</strong><br />
Cleaning up my Active Directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msserveradmin.com/disable-inactive-active-directory-user-accounts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
