<?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>Enterprise Admin dot Com</title>
	<atom:link href="http://enterprise-admin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://enterprise-admin.com</link>
	<description>How-To&#039;s for Enterprise and Domain Administrators</description>
	<lastBuildDate>Wed, 23 Jan 2013 14:00:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>Ubuntu Phone and implications for the Enterprise</title>
		<link>http://enterprise-admin.com/2013/01/23/ubuntu-phone-implications-enterprise/</link>
		<comments>http://enterprise-admin.com/2013/01/23/ubuntu-phone-implications-enterprise/#comments</comments>
		<pubDate>Wed, 23 Jan 2013 13:56:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=149</guid>
		<description><![CDATA[I dont know about you but the recent news from Ubuntu regarding the Ubuntu OS on mobile devices is very very exciting to me. A &#8220;One device fits all&#8221; model is finally within grasp! Combining ideas like the Asus Padphone and VDI on an ARM (phone) device would allow a user to carry a phone [...]]]></description>
				<content:encoded><![CDATA[<p><img class="aligncenter" alt="Ubuntu Phone Docked" src="http://www.ubuntu.com/static/u/img/devices/converged-device-440x267.jpg" /></p>
<p>I dont know about you but the recent news from Ubuntu regarding the Ubuntu OS on mobile devices is very very exciting to me. A &#8220;One device fits all&#8221; model is finally within grasp!</p>
<p>Combining ideas like the <a title="Asus Padphone" href="http://www.asus.com/Tablet_Mobile/PadFone2/" target="_blank">Asus Padphone</a> and VDI on an ARM (phone) device would allow a user to carry a phone in their pocket to grab emails on the go, dock to a tablet to take notes in meetings, then dock on their desk to allow a full Windows desktop experience.</p>
<p>Combining that with something like VMWARE View or Citrix XenDesktop clients to start up as soon as the phone are docked would facilitate very interesting scenarios.</p>
<p>Also, when you consider how easy it is to provision devices for enterprise users with <a title="Air-Watch" href="http://www.air-watch.com/solutions/mobile-device-management" target="_blank">Airwatch</a>, which is surely to support Ubuntu Phone in the future, I can see Ubuntu Phone becoming a real option for enterprise in the near future.</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2013/01/23/ubuntu-phone-implications-enterprise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What to do when your transaction log drive is full (using Powershell)</title>
		<link>http://enterprise-admin.com/2012/08/20/what-to-do-when-your-transaction-log-drive-has-filled-up-using-powershell/</link>
		<comments>http://enterprise-admin.com/2012/08/20/what-to-do-when-your-transaction-log-drive-has-filled-up-using-powershell/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 11:32:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[2008 R2]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=124</guid>
		<description><![CDATA[&#160; What to do when your transaction log drive is full (using Powershell) I recently had to resolve an issue where backups had paused, causing our transaction log drive to fill up on Exchange. Obviously this happened just as I was about to leave on a Friday afternoon! First things first&#8230; DO NOT DELETE ANY TRANSACTION LOGS!!! [...]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>What to do when your transaction log drive is full (using Powershell)</strong></span></p>
<p>I recently had to resolve an issue where backups had paused, causing our transaction log drive to fill up on Exchange. Obviously this happened just as I was about to leave on a Friday afternoon!</p>
<p>First things first&#8230; DO NOT DELETE ANY TRANSACTION LOGS!!! if you do, the databases will more than likely not mount. Very Very important!!</p>
<p>The guide assumes that your log drive is 100% full, your databases have dismounted and you feel like pulling your hair out.</p>
<p>First, make sure your databases are dismounted. You can check this in the failover cluster manager (if its a clustered mailbox server), in the exchange management tools GUI or using Powershell on the mailbox server.</p>
<p><strong><span style="color: #3366ff;">Get-Mailboxdatabase -status | where {$_.Mounted -eq $true}</span><br />
</strong>(will tell you what databases are mounted)</p>
<p><strong><span style="color: #3366ff;">Get-Mailboxdatabase -status | where {$_.Mounted -eq $false}</span><br />
</strong>(will tell you if the database is dismounted)</p>
<p>Once you&#8217;ve ensured your exchange database is dismounted you can do one of two things. Either move the logs yourself to a new location, or let the exchange powershell cmdlet do it for you.</p>
<p>I personally prefer to move the logs myself so I can see the progress but its up to you.If youve moved the logs yourself, run the following after they&#8217;ve moved:</p>
<p><strong><strong><span style="color: #3366ff;"><strong><strong>move-storagegrouppath -identity SERVERNAME\STORAGEGROUPNAME&#8221;</strong></strong><strong><strong>-LogFolderPath X:\NEWLOGPATH</strong></strong></span><span style="color: #3366ff;"> -ConfigurationOnly</span></strong></strong></p>
<p><strong><strong></strong></strong>If you want the powershell cmdlet to move them for you, run this command instead:</p>
<p><strong></strong><strong><strong><strong><span style="color: #3366ff;">move-storagegrouppath -identity SERVERNAME\STORAGEGROUPNAME&#8221;</span> <span style="color: #3366ff;">-LogFolderPath X:\NEWLOGPATH </span></strong></strong></strong></p>
<p>Once the commands are complete, you can mount the database again and all should be well.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>If you have transaction logs and mailbox databases on the same drive</strong></span></p>
<p>If for some crazy reason you have your transaction logs and your mailbox databases on the same drive, you might opt to move the database rather than the logs (due to how much space you have available in the new location)</p>
<p>Obviously you need the databases dismounted for this as well, either in cluster manager, the gui or using powershell (as above).</p>
<p>For this, I do prefer to let powershell move the database (edb file) . The progress bar doesnt tend to reflect how far the copy has got, so dont worry if it doesnt move. I use resouce monitor to make sure the disk activity is active between the source and destination.</p>
<p>To initiate the database move (powershell will move the database for you):</p>
<p><strong><span style="color: #0000ff;">Move-DatabasePath -identity &#8220;MAILSERVER\STORAGEGROUP\DATABASE&#8221; -EdbFilePath &#8220;X:\NewLocation\Database.edb&#8221;</span></strong></p>
<p>If you want me to go over anything else, please leave a comment.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/08/20/what-to-do-when-your-transaction-log-drive-has-filled-up-using-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bulk converting AD groups from Domain Local or Global to Universal</title>
		<link>http://enterprise-admin.com/2012/02/03/bulk-converting-ad-groups-domain-local-global-universal/</link>
		<comments>http://enterprise-admin.com/2012/02/03/bulk-converting-ad-groups-domain-local-global-universal/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 15:11:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=112</guid>
		<description><![CDATA[&#160; A useful but short post for a friday afternoon. I needed to convert around 300 groups from DL\Global to universal as a precursor for some user migrations to another domain in the forest we are part of. I did have the option of having a 1st line engineer go through each one and change the type&#8230; [...]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p>A useful but short post for a friday afternoon.<br />
I needed to convert around 300 groups from DL\Global to universal as a precursor for some user migrations to another domain in the forest we are part of. I did have the option of having a 1st line engineer go through each one and change the type&#8230; but I didnt want to find his body on the pavement at the end of the day so i wrote a script <img src='http://enterprise-admin.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>Again, i used the AD CMDlets from PowerGUI ( <a href="http://community-downloads.quest.com/powergui/Release/3.1/PowerGUI.3.1.0.2058.msi">http://community-downloads.quest.com/powergui/Release/3.1/PowerGUI.3.1.0.2058.msi</a>)</p>
<p>Code is here:</p>
<address><span style="color: #0000ff;">$group=<strong>Get-QADGroup</strong> <em>-SearchRoot</em> &#8220;Domain/OU/&#8221; GroupScope Global</span></address>
<address> </address>
<address><span style="color: #0000ff;">foreach ($objitem in $group){</span></address>
<address><span style="color: #0000ff;"><strong>Set-qadgroup</strong> <em>-Identity</em> $objitem <em>-GroupScope</em> Universal</span></address>
<address><span style="color: #0000ff;">}</span></address>
<p>All its doing is:</p>
<ul>
<li>Looking in the OU here: &#8220;Domain/OU&#8221;</li>
<li>For global groups: <em>-groupscope</em> Global</li>
<li>And setting what it finds to universal: <strong>Set-qadgroup</strong><em>-Identity</em> $objitem <em>-GroupScope</em> Universal</li>
</ul>
<p>Nice and easy!<br />
To change what its looking for to Domain local groups, change the groupscope to DomainLocal.<br />
To change what the group type will be set to, change the 2nd groupscope to DomainLocal or Global. Obviously you cant change from universal to global\domain local if you have members outside of your domain.</p>
<p>Any questions, add to the comments. If this has helped, donate me a bitcent or two!</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/02/03/bulk-converting-ad-groups-domain-local-global-universal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Team Intel Pro 1000MT in Windows Server 2008 R2</title>
		<link>http://enterprise-admin.com/2012/01/27/team-intel-pro-1000mt-windows-server-2008-r2/</link>
		<comments>http://enterprise-admin.com/2012/01/27/team-intel-pro-1000mt-windows-server-2008-r2/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 10:04:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[2008 R2]]></category>
		<category><![CDATA[Intel Pro 1000MT]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Server Hardware]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=107</guid>
		<description><![CDATA[I recently had to install Server 2008 R2 on an old Dell Poweredge 2850 and had a need to team the network adaptors. Intel sadly dont support this as standard so you have to follow a couple of steps to get it working! First you need to download the driver CD Zip file from here:http://www.lostmydrivers.com/driver/download/25242/Intel/Network-Drivers/INTEL-PRO-1000-MT-DRIVER-15.3-WINDOWS-XP-32-64-2003-32-64-VISTA-32-64-7-32-64-WINDOWS-VISTA-WIN20. Extract [...]]]></description>
				<content:encoded><![CDATA[<p>I recently had to install Server 2008 R2 on an old Dell Poweredge 2850 and had a need to team the network adaptors. Intel sadly dont support this as standard so you have to follow a couple of steps to get it working!</p>
<p>First you need to download the driver CD Zip file from here:<a href="http://www.lostmydrivers.com/driver/download/25242/Intel/Network-Drivers/INTEL-PRO-1000-MT-DRIVER-15.3-WINDOWS-XP-32-64-2003-32-64-VISTA-32-64-7-32-64-WINDOWS-VISTA-WIN20.">http://www.lostmydrivers.com/driver/download/25242/Intel/Network-Drivers/INTEL-PRO-1000-MT-DRIVER-15.3-WINDOWS-XP-32-64-2003-32-64-VISTA-32-64-7-32-64-WINDOWS-VISTA-WIN20.</a></p>
<p>Extract the content and update the drivers from the \V15.3_CD\PRO1000\Winx64\NDIS61 folder in device manager.</p>
<p>Once the drivers have been updated you can install the teaming software from \V15.3_CD\APPS\PROSETDX\Winx64\ProsetDX.msi and it should run through and add the necessary tabs to the network adaptors in device manager.</p>
<p>&nbsp;</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/01/27/team-intel-pro-1000mt-windows-server-2008-r2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a &#8220;no reply&#8221; address \ hub transport rule in Exchange 2007</title>
		<link>http://enterprise-admin.com/2012/01/24/creating-no-reply-address-exchange-2007/</link>
		<comments>http://enterprise-admin.com/2012/01/24/creating-no-reply-address-exchange-2007/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 11:30:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=92</guid>
		<description><![CDATA[We have recently implemented a service that required an email to be sent out with an alert to users. The email states that no responses to the email will be recived. To Keep things tidy, I wanted to create a transport rule in exchange to automatically drop messages sent back to the address so emails [...]]]></description>
				<content:encoded><![CDATA[<p>We have recently implemented a service that required an email to be sent out with an alert to users. The email states that no responses to the email will be recived.<br />
To Keep things tidy, I wanted to create a transport rule in exchange to automatically drop messages sent back to the address so emails dont mount up, whether it be global email sent to all users, replies or just spam. I use Exchange 2007 and im not sure if the same process applies to 2010 as ive not used it. I cant see it being much different though.</p>
<p>After creating the mailbox and configuring the service to use the email address you create the transport rule in exchange.  First open the Exchange Management console and on the left navigation par, browse to Organisation Configuration and to Hub Transport.</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/Hub-Transport-Selection.jpg" alt="Hub Transport Selection" /></p>
<p>Right Click in the blank space of the hub transport window and select new rule. Type in a relevant name and comment so its easily identified in the future.</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/New-TR.jpg" alt="New Hub Transport Rule" /></p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/rule1.jpg" alt="Hub Transport Rule Wizard 1" /></p>
<p>At the first config page of the rule, you select what user (the no-reply user) the rule will apply to. You can instead apply to rule to members of a distribution list if you have more than one no-reply address. That way to apply the rule to new no-reply addresses in the future, youd just add them to the applicable distribution list and not have to edit the rule each time a new address is created.<br />
In this instance i&#8217;m adding an individual user, but the process is the same.<br />
Tick the &#8220;Sent to people&#8221; Option (select &#8220;Sent to member of a distribution list&#8221; to set up against a dist list) click on &#8220;people&#8221; in the window below and browse and select the no-reply user. click next</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/rule2.jpg" alt="Hub Transport Rule Wizard 2" /><br />
On the next screen, select the action at the bottom of the list &#8220;silently drop the message&#8221; and click next.</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/rule3.jpg" alt="Hub Transport Rule Wizard 3" /></p>
<p>Leave the exceptions blank, unless you have any special requirements. Click next, the click new.</p>
<p>The Last screen will state that the operation has completed sucessfully and show the powershell script the GUI used to apply the change.</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/rule4.jpg" alt="Hub Transport Rule Wizard 4" /></p>
<p>Once its created, view the entry in the Hub Transport list and ensure the rule is enabled. (Otherwise it wont work!). if its disabled, right click and enable the rule.</p>
<p>Happy email dropping!</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/01/24/creating-no-reply-address-exchange-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing CSV files to powershell to perform bulk commands</title>
		<link>http://enterprise-admin.com/2012/01/18/passing-csv-files-to-powershell-to-perform-bulk-commands/</link>
		<comments>http://enterprise-admin.com/2012/01/18/passing-csv-files-to-powershell-to-perform-bulk-commands/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 09:15:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[CMDlet]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[Quest]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=68</guid>
		<description><![CDATA[Nice easy one for a Wednesday morning. Again, you&#8217;ll need the quest Powershell ActiveRoles Management Plugin from here: http://www.quest.com/powershell/activeroles-server.aspx For this i&#8217;ll be using the New-QADUser command but you can use any command you like. All the csv and code is doing before that command is populating some variables that are passed to the command. To tell Powershell [...]]]></description>
				<content:encoded><![CDATA[<p>Nice easy one for a Wednesday morning.<br />
Again, you&#8217;ll need the quest Powershell ActiveRoles Management Plugin from here: <a href="http://www.quest.com/powershell/activeroles-server.aspx">http://www.quest.com/powershell/activeroles-server.aspx</a></p>
<p>For this i&#8217;ll be using the New-QADUser command but you can use any command you like. All the csv and code is doing before that command is populating some variables that are passed to the command.</p>
<p>To tell Powershell what CSV file to use, you use the Import-Csv command and assign to a variable, then pick out each row and assign each value to its own variable :</p>
<address><span style="color: #0000ff;">$List = Import-Csv C:\scripts\list.csv</span></address>
<address><span style="color: #0000ff;">ForEach ($entry in $list){ </span></address>
<address><span style="color: #0000ff;">$firstname = $($entry.firstname)</span><br />
<span style="color: #0000ff;">$lastname = $($entry.lastname)</span><br />
<span style="color: #0000ff;">$ccg = $($entry.ccg) </span><br />
<span style="color: #0000ff;">$code = $($entry.code)</span><br />
<span style="color: #0000ff;">$job = $($entry.job)</span><br />
<span style="color: #0000ff;">$name=$lastname+&#8221; &#8220;+$firstname </span><br />
<span style="color: #0000ff;">$username=$firstname+&#8221;.&#8221;+$lastname</span><br />
<span style="color: #0000ff;">$displayname=$name+&#8221; (DOMAIN)&#8221;</span><br />
<span style="color: #0000ff;">$upn=$username+&#8221;@domain.uk&#8221;</span><br />
<span style="color: #0000ff;">$password=&#8221;tgrefgbfdbfdshgtfsbgfd&#8221;</span></address>
<address><span style="color: #0000ff;">if ($ccg -eq &#8220;preston&#8221;) { </span><br />
<span style="color: #0000ff;">$ou = &#8220;Domain/OU1/Preston&#8221;</span><br />
<span style="color: #0000ff;">}</span><br />
<span style="color: #0000ff;">if ($ccg -eq &#8220;csr&#8221;) {</span><br />
<span style="color: #0000ff;">$ou = &#8220;Domain/OU2/C&amp;SR&#8221;</span><br />
<span style="color: #0000ff;">}</span><br />
<span style="color: #0000ff;">if ($ccg -eq &#8220;wl&#8221;) {</span><br />
<span style="color: #0000ff;">$ou = &#8220;Domain/OU3/West Lancs&#8221;</span><br />
<span style="color: #0000ff;">}</span></address>
<p>The CSV contains the users name, CCG (OU Name), job title and Job Code. Each are assigned a variable, then other values such as Display name and username are constructed from the variables in the csv file. If I wanted to add more values from the csv, id create a new column (eg Phone number), then reference it in the code like this:</p>
<address><span style="color: #0000ff;">$phone = $($entry.phone)</span></address>
<address> </address>
<p>The $phone at the start of the string is the variable within powershell. the &#8220;($entry&#8221; is the variable for the csv specified at the top of the code and &#8220;.phone)&#8221; is the column name in the csv.<br />
Once all the variables have been specified that you want to use, you add the command:</p>
<address><span style="color: #0000ff;">New-QADUser -FirstName $firstname -LastName $lastname -Name $name -DisplayName $displayname -UserPrincipalName $upn -UserPassword $password -ParentContainer $ou -SamAccountName $username -Office $code -Description $job</span></address>
<address> </address>
<p>To add an additional variable such as phone number, you would add &#8220;-PhoneNumber $phone&#8221; to the command.<br />
Blank values in the CSV will add a blank value to the object in AD when the account is created.  PS1 download is below.</p>
<p><a href="http://enterprise-admin.com/wp-content/uploads/2012/01/PSBulk.ps1" title="Powershell File">Powershell File</a></p>
<p><a href="http://enterprise-admin.com/wp-content/uploads/2012/01/list.csv" title="Sample CSV">Sample CSV</a></p>
<p><!-- Place this tag where you want the +1 button to render --><br />
<g:plusone annotation="inline"></g:plusone></p>
<p><!-- Place this render call where appropriate --><br />
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script></p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/01/18/passing-csv-files-to-powershell-to-perform-bulk-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lazy Admin Quick Fix Tool</title>
		<link>http://enterprise-admin.com/2012/01/17/lazy-admin-quick-fix-tool/</link>
		<comments>http://enterprise-admin.com/2012/01/17/lazy-admin-quick-fix-tool/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 16:30:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Psexec]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=31</guid>
		<description><![CDATA[I thoughts id be a good samaritan and write a tool to help our service desk automate a few day to day tasks to make their lives a little easier&#8230; (im nice like that!). Its basicly an old school batch menu that calls a PSexec command to run on another computer. All the Service desk [...]]]></description>
				<content:encoded><![CDATA[<p>I thoughts id be a good samaritan and write a tool to help our service desk automate a few day to day tasks to make their lives a little easier&#8230; (im nice like that!).</p>
<p>Its basicly an old school batch menu that calls a PSexec command to run on another computer. All the Service desk tech needs to do is enter the PC number they want to send the command to, then pick the option from the menu. Once its done, they wait for the next job, enter a new PC number then select another command. The command will run as the tech regardless of what user is logged onto the PC at the other end.<br />
May be worth mentioning that our users are basic users on PCs (not power users or local admin) and our Service desk Techs are Part of a security group that has local administrator rights over users PCs. In the past they&#8217;d have to open a dameware session (Like VNC) and run any of these commands manually.<br />
Heres what it looks like:</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/QFMainScreen.jpg" alt="Main GUI" /></p>
<p>Selecting option A lets you set the value for the PC you want to connect to.  The PSExec command then uses the variables specified, and picks out the command from the menu option selected. Basicly ANYTHING you can run from the command line can be implemented into the menu. All commands will run as the techy, so no need for the user to log out to perform the commands.</p>
<p>The Office 2010 Utilities option also launches a submenu, with a few options in:</p>
<p><img src="http://enterprise-admin.com/wp-content/uploads/2012/01/OfficeMenu.jpg" alt="Office Menu" /></p>
<p><!-- Place this tag where you want the +1 button to render --><br />
<g:plusone annotation="inline"></g:plusone></p>
<p><!-- Place this render call where appropriate --><br />
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script></p>
<p>&nbsp;</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/01/17/lazy-admin-quick-fix-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Powershell script to create user accounts on Active Directory</title>
		<link>http://enterprise-admin.com/2012/01/14/building-a-powershell-script-to-create-user-accounts-on-active-directory/</link>
		<comments>http://enterprise-admin.com/2012/01/14/building-a-powershell-script-to-create-user-accounts-on-active-directory/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 18:24:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://enterprise-admin.com/?p=17</guid>
		<description><![CDATA[User accounts in Active directory can be a pain (and boring) to create&#8230; especially if you have a high staff turnover or you need to add extra bits to user accounts once they&#8217;ve been provisioned. For example, when we create a user account in our domain environment i need to: Format the Display name in a certain way. eg, [...]]]></description>
				<content:encoded><![CDATA[<p>User accounts in Active directory can be a pain (and boring) to create&#8230; especially if you have a high staff turnover or you need to add extra bits to user accounts once they&#8217;ve been provisioned.</p>
<p>For example, when we create a user account in our domain environment i need to:</p>
<ul>
<li>Format the Display name in a certain way. eg, &#8220;Smith Jane (CLPCT)&#8221;</li>
<li>Format the username (Jane.Smith)</li>
<li>As we are part of a large AD forest, i sometimes need to choose a different domain suffix in the UPN.</li>
<li>The account needs to be added to the correct OU to pick up group policy</li>
<li>The mailbox needs to be placed in a particular database in exchange depending on the domain and the users name\position</li>
<li>Custom attributes sometimes need to be added</li>
<li>Add the user to one or more common AD security groups</li>
<li>Depending on the domain, add a profile path based on the users login name</li>
</ul>
<p>The list goes on and on. With so many steps involved, its easy to miss some and cause problems later down the line.</p>
<p>I decided to create an easy way to create the accounts by entering the bare minimum about the user then selecting the rest of the info from menus and letting powershell do all the work for me.</p>
<p>To make this happen i used:</p>
<ul>
<li>PowerGUI from here: <a href="http://enterprise-admin.com/go/Powergui/">http://powergui.org</a></li>
<li>Quest Activeroles AD Cmdlets <a href="http://enterprise-admin.com/go/Quest/">http://www.quest.com/powershell/activeroles-server.aspx</a></li>
</ul>
<div><span style="font-size: small;"><span style="line-height: 24px;">Before doing any of this, i suggest you TEST on a TEST domain, or a TEST OU&#8230;. TEST!</span></span></div>
<p>When installing powerGUI, be sure to select AD and Exchange from the powerpacks when you get to the installation feature screen. Also, when installing the Quest activeroles cmdlets, select the option to change powershell to allow unsigned code to run otherwise you&#8217;ll hit problems when you come to run your scripts.</p>
<p>Now that bits done we can start on some code&#8230;</p>
<p>All my code does is have the commands to create an exchange mailbox and modify an AD user account ready filled with variables, then have multiselection menus and prompts to popualte them. here we go&#8230;</p>
<p>First things first. We need to work out what commands we will be using and what values we can apply. Creating an exchange account will also create an account in active directory, so I use the New-Mailbox command. typing the command into a new powerGUI window will show you all the available values you can apply when creating the account. Some user object attributes arent available with that command so we will need to use Set-QADUser after the exchange command to add the bits its missing.</p>
<p>So here’s the command I use for the new mailbox:</p>
<address><span style="color: #0000ff;"><em>New-Mailbox -DomainController $dc -name $name -userprincipalname $upn -Alias $username -OrganizationalUnit $ou -FirstName $firstname -LastName $LastName -Password $password -ResetPasswordOnNextLogon $true -Database $maildatabase -DisplayName $displayname</em></span></address>
<p>And the extra values you cant specify in the New-Mailbox command:</p>
<address><span style="color: #0000ff;"><em>Set-QADUser -Identity $upn -ProfilePath $profilepath</em></span></address>
<p>All the values starting with $ are variables ive set before the commands run. To set the variables ive added some prompts, along with some &#8220;write-host&#8221; commands to list all the options.</p>
<p>Here I prompt for the basics:</p>
<address><span style="color: #0000ff;"><em>$firstname = read-host -prompt &#8220;Enter First Name&#8221;<br />
$lastname = read-host -prompt &#8220;Enter Last Name&#8221;<br />
$trust = read-host -prompt &#8220;LCFT or CLPCT or ICO&#8221;<br />
$password = read-host -assecurestring -prompt &#8220;Please enter a Password&#8221;</em></span></address>
<p>Then from the Values above, i can construct some of the other values based on how we format them in our domain.</p>
<address><span style="color: #0000ff;"><em>$name=$lastname+&#8221; &#8220;+$firstname<br />
$username=$firstname+&#8221;.&#8221;+$lastname<br />
$displayname=$name+&#8221; (&#8220;+$trust+&#8221;)&#8221;</em></span></address>
<address><span style="color: #0000ff;"><em>if ($trust -eq &#8220;CLPCT&#8221;) {<br />
$domain = &#8220;@centrallancashire.nhs.uk&#8221;<br />
$attrib = &#8221; &#8221;<br />
}<br />
if ($trust -eq &#8220;LCFT&#8221;) {<br />
$domain = &#8220;@lancashirecare.nhs.uk&#8221;<br />
$attrib = &#8220;TCS-LCFT-CL&#8221;<br />
}<br />
if ($trust -eq &#8220;ICO&#8221;) {<br />
$domain = &#8220;@centrallancashire.nhs.uk&#8221;<br />
$attrib = &#8220;TCS-ICO&#8221;<br />
}</em></span></address>
<address><span style="color: #0000ff;"><em>$upn=$username+$domain</em></span></address>
<p>Here&#8217;s the options for the $maildatabase value.</p>
<address><span style="color: #0000ff;"><em>Write-Host &#8220;&#8221;<br />
Write-Host -foregroundcolor Green &#8220;Please Pick a Mailbox Database&#8221;<br />
Write-Host &#8220;&#8221;<br />
Write-Host &#8220;0 &#8211; TCS User&#8221;<br />
Write-Host &#8220;1 &#8211; StandardUsersA-C&#8221;<br />
Write-Host &#8220;2 &#8211; StandardUsersD-F&#8221;<br />
Write-Host &#8220;3 &#8211; StandardUsersG-I&#8221;<br />
Write-Host &#8220;4 &#8211; StandardUsersJ-L&#8221;<br />
Write-Host &#8220;5 &#8211; StandardUsersM-O&#8221;<br />
Write-Host &#8220;6 &#8211; StandardUsersP-R&#8221;<br />
Write-Host &#8220;7 &#8211; StandardUsersS-U&#8221;<br />
Write-Host &#8220;8 &#8211; StandardUsersV-W&#8221;<br />
Write-Host &#8220;9 &#8211; StandardUsersX-Z&#8221;<br />
Write-Host &#8220;&#8221;<br />
$mailnumber = read-host -prompt &#8220;Please Choose a number&#8221;</em></span></address>
<address><span style="color: #0000ff;"><em>if ($mailnumber -eq &#8220;0&#8243;) {<br />
$maildatabase = &#8220;MAIL\VIPUsers\VIPUsers&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;1&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersA-C\StandardUsersA-C&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;2&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersD-F\StandardUsersD-F&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;3&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersG-I\StandardUsersG-I&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;4&#8243;) {<br />
$maildatabase = &#8220;-MAIL\StandardUsersJ-L\StandardUsersJ-L&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;5&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersM-O\StandardUsersM-O&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;6&#8243;) {<br />
$maildatabase = &#8220;-MAIL\StandardUsersP-R\StandardUsersP-R&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;7&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersS-U\StandardUsersS-U&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;8&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersV-W\StandardUsersV-W&#8221;<br />
}<br />
if ($mailnumber -eq &#8220;9&#8243;) {<br />
$maildatabase = &#8220;MAIL\StandardUsersX-Z\StandardUsersX-Z&#8221;<br />
}</em></span></address>
<p>MAIL in this instance is the name of our Exchange mailbox server. The rest is the path the the mailbox databases. You&#8217;ll be able to pick your own values out of exchange. The code to populate the $ou variable is very similar.</p>
<p>To run the script from a shortcut, you&#8217;ll need to create a shortcut that calls powershell.exe then references the location of the ps1 file. So change the target to something like:</p>
<address><span style="color: #0000ff;">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file &#8220;C:\location of ps1 file&#8221;</span></address>
<address> </address>
<p>You can use unc paths if your wanting to share  the script with other people</p>
<p>My PS1 file is below. you&#8217;ll need to go through and change the values to suit your own domain. Any questions, post a comment.</p>
<p><a href="http://enterprise-admin.com/wp-content/uploads/2012/01/blogNEWUSER.ps1" title="Powershell File">Powershell File</a></p>
<p><!-- Place this tag where you want the +1 button to render --><br />
<g:plusone annotation="inline"></g:plusone></p>
<p><!-- Place this render call where appropriate --><br />
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script><br />
&nbsp;</p>

<!-- SEO Ultimate (http://www.seodesignsolutions.com/wordpress-seo/) - Code Inserter module -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-7579885082888508";
/* Ad 2 */
google_ad_slot = "6573073366";
google_ad_width = 700;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- /SEO Ultimate -->

]]></content:encoded>
			<wfw:commentRss>http://enterprise-admin.com/2012/01/14/building-a-powershell-script-to-create-user-accounts-on-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
