<?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>dunxd.com &#187; InfoTech</title>
	<atom:link href="http://www.dunxd.com/category/infotech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dunxd.com</link>
	<description>Arusha &#124; Tokyo &#124; Tower Hamlets</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:51:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>VSAT Gotchas</title>
		<link>http://www.dunxd.com/2012/02/07/vsat-gotchas/</link>
		<comments>http://www.dunxd.com/2012/02/07/vsat-gotchas/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 13:50:43 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[InfoTech]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=1168</guid>
		<description><![CDATA[In some locations, the only option for an internet connection is to use some form of satellite link. Like any wireless medium these can be quite tricky to troubleshoot. Here are some factors I have experienced or learnt about that can cause problems for a VSAT connection. Obstruction to the line of sight to the [...]]]></description>
			<content:encoded><![CDATA[<p>In some locations, the only option for an internet connection is to use some form of satellite link. Like any wireless medium these can be quite tricky to troubleshoot.</p>
<p>Here are some factors I have experienced or learnt about that can cause problems for a VSAT connection.</p>
<h2>Obstruction to the line of sight to the satellite</h2>
<div id="attachment_1171" class="wp-caption alignright" style="width: 310px"><a href="http://www.dunxd.com/files/2012/02/MakeniVSAT2.jpg"><img class="size-medium wp-image-1171  " title="Obstructive Mango Tree in Makeni, Sierra Leone" src="http://www.dunxd.com/files/2012/02/MakeniVSAT2-300x225.jpg" alt="Obstructive Mango Tree in Makeni, Sierra Leone" width="300" height="225" /></a><p class="wp-caption-text">Obstructive Mango Tree in Makeni, Sierra Leone</p></div>
<p>Anything that gets in between the VSAT dish and the satellite can weaken or obliterate the signal. Obviously when you initially set up a VSAT dish you find the clearest possible view of the sky, but environments have a tendancy to change. Buildings are erected, or extra floors are built. Trees grow taller or grow extra foliage. I&#8217;ve experienced this with mango trees in a couple of locations. Mango trees seem to be common in locations where VSAT is the only connection option!</p>
<h2>RF interferance</h2>
<p>VSAT operates in several frequency ranges, the most common being:</p>
<ul>
<li><a rel="nofollow" href="http://en.wikipedia.org/wiki/Ku_band">Ku band</a> &#8211; 12-18 GHz</li>
<li><a rel="nofollow" href="http://en.wikipedia.org/wiki/Ka_band">Ka band</a> &#8211; 26.5 &#8211; 40 GHz</li>
<li><a rel="nofollow" href="http://en.wikipedia.org/wiki/C_band">C Band</a> &#8211; 4 &#8211; 8 GHz</li>
</ul>
<p>Different things can create interference in each of these bands. Notably, WiMax operates in the 2 &#8211; 11 GHz, which overlaps C Band. C Band installations within 50 miles of a WiMax network can potentially be effected. <a rel="nofollow" href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=5431558">Nice one IEEE!</a> I have also observed local welding work to completely obliterate a Ku band signal. When the work was completed the connection came back.</p>
<h2>Rain Fade</h2>
<p>Ku band is notorious for being affected by water droplets in the atmosphere &#8211; commonly referred to as<a rel="nofollow" href="http://en.wikipedia.org/wiki/Rain_fade"><em>rain fade</em></a> &#8211; although this can affect any frequency above 11 GHz. This is now usually mitigated against by changes to the transmission power at the satellite and earth stations, but can still sometimes cause problems. Build up of moisture in the feed horn of a VSAT dish can degrade the signal enough to break the connection &#8211; if the moisture is removed, or once it evaporates, the connection is reestablished.</p>
<h2>Physical disruption</h2>
<p>Pointing a dish at a small object <a rel="nofollow" href="http://en.wikipedia.org/wiki/Geostationary_orbit">35,786 km away</a> is a fine art. Moving the dish by just 1 degree results in pointing at something more than 600 km away from the satellite! Small knocks to the dish can result in loss of signal, but the dish still looks like it is pointing in the right direction. That is why you spend a lot of money and effort on building secure mounts for your dishes, and put up signs suggesting that getting near the dish is dangerous. Leaving dead birds lying around the dish can be helpful! Talking of birds, they have been known to build nests in VSAT dishes &#8211; they generally come with some spikes to discourage this. I&#8217;ve seen a 1.5m <a rel="nofollow" href="http://en.wikipedia.org/wiki/Marabou_Stork">Maribou stork</a> perching on a VSAT dish.</p>
<p>Cabling can also get damaged (and is expensive and awkward to replace). Again, investment in proper cable runs is worthwhile. Wind blowing a loose cable against a wall, especially over an edge, can result in damage to the cable.</p>
<h2>Lightning strikes</h2>
<p>Like any metal outdoor object pointed at the sky, lightning strikes are a risk. Generally you won&#8217;t be supplied VSAT equipment without some form of <a rel="nofollow" href="http://en.wikipedia.org/wiki/Lightning_protection_system">lightning protection</a>, but adequate earthing/grounding is usually left up to you. Are <a rel="nofollow" href="http://en.wikipedia.org/wiki/Lightning_rod">lightning rods</a> a good idea? I&#8217;m not sure, and haven&#8217;t been involved in any installations that include them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2012/02/07/vsat-gotchas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grameen&#8217;s Community Knowledge Worker programme &#8211; an I4D case study</title>
		<link>http://www.dunxd.com/2011/11/25/grameens-community-knowledge-worker-programme-an-i4d-case-study/</link>
		<comments>http://www.dunxd.com/2011/11/25/grameens-community-knowledge-worker-programme-an-i4d-case-study/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 16:37:21 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[Christian Aid]]></category>
		<category><![CDATA[InfoTech]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=1162</guid>
		<description><![CDATA[At this years Nethope conference, which I attended last week, the stand out for me was a presentation of a project run by Grameen &#8211; their Community Knowledge Worker programme in Uganda. The project employs Community Knowledge Workers who live in communities in Uganda.  These CKWs, many of whom were previously Agricultural Extension Workers, are &#8220;trusted [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="CKW" src="http://www.grameenfoundation.applab.org/ckw/uploads/CKWs/2ckws.png" alt="Grameen Community Knowledge Workers" width="285" height="198" />At this years Nethope conference, which I attended last week, the stand out for  me was a presentation of a project run by Grameen &#8211; their Community Knowledge  Worker programme in Uganda.</p>
<p>The project employs  Community Knowledge Workers who live in communities in Uganda.  These CKWs, many  of whom were previously Agricultural Extension Workers, are &#8220;trusted neighbours&#8221;  who can be consulted on a variety of issues that are deemed useful for  smallholder farmers in Uganda.  <a href="http://www.grameenfoundation.applab.org/ckw/section/about-ckw">More  details about the CKW programme can be found on the Grameen website</a>.</p>
<p><img class="alignright" title="IDEOS phone" src="http://st2.gsmarena.com/vv/bigpic/huawei-ideos.jpg" alt="IDEOS phone - an $80 smart phone!" width="139" height="184" />At the presentation I attended, Grameen showcased the technology they are using  to support their CKWs.  Each CKW is supplied with an <a href="http://www.gsmarena.com/huawei_u8150_ideos-3513.php">IDEOS android mobile  phone</a> &#8211; these retail for $80 in Kenya.  The phones have three Grameen  authored apps installed.</p>
<p>The first app, <strong>CKW Search</strong>, is a searchable repository of  information that the CKW can consult through a very simple menu.  This  information is stored locally on the phone, but is updated automatically when a  3G signal is available.  Each query is logged in the system with GPS  coordinates, and this information is sent back to Grameen when a 3G signal is  available.</p>
<p>The second app, <strong>CKW Survey</strong>, is a simple forms based app the CKW  can use to capture images, video and text, as well as fill out surveys &#8211;  typically the CKW will survey farmers who use their services.  Again the data is  stored locally on the phone until a 3G signal is available.</p>
<p>The final app, <strong>CKW Pulse</strong>, is the hub through which Grameen can  communicate with the CKWs.  This can be used to message an individual CKW or a  group.  Each CKW can monitor their own performance based on the work they have  done with the other two apps.  CKWs can also log support calls through CKW  Pulse.</p>
<p>In addition to these  applications, the CKWs can supplement their income by selling airtime on the  phones, and selling phone charging services using the solar chargers they have  for chargind the IDEOS phones.</p>
<p>At the backend, Grameen  are using Salesforce to collect the data, and have <a href="http://grameenfoundation.force.com/ckw/apex/Dashboard?sfdc.tabName=01r70000000HaJA">a  live dashboard where various aspects of the CKW service can be monitored</a>.   The survey application is based on the <a href="http://opendatakit.org/">Open  Data Kit</a> &#8211; a free open-source set of tools built to make survey building and  data collection quick and easy.</p>
<p>This project is a  great showcase of what can be achieved by joining up widespread mobile phone  coverage, low cost smart phones, online database systems, and a well trained  local workforce.</p>
<p>There are a number  of opportunities that Christian Aid could take advantage of here.</p>
<ul>
<li>Simple surveys on touch screen phones are a great way to collect baseline  data and aggregate it quickly, before and after other initiatives have been  carried out.</li>
<li>The ability to collect images, audio and video and send them quickly through  3G networks means that collecting stories about our work is easier and more  immediate than ever.</li>
<li>The Pulse application could be a useful way to immediately keep in touch  with partner organisations, reminding them about deadlines, contacting them with  specific messages, or allowing them to see the results of M&amp;E activities and  understand their performance.</li>
<li>The Search application is a simple way of making different kinds of  information available offline.  This could be useful for Christian Aid staff, as  well as in programme work that employs the &#8220;trusted neighbour&#8221; model or  similar.</li>
</ul>
<p>For more information on the Grameen CKW project I suggest the following  reading:</p>
<ul>
<li><a href="http://www.grameenfoundation.applab.org/ckw">Grameen&#8217;s CKW project  site</a>, for general details of the CKW service</li>
<li><a href="http://www.grameenfoundation.applab.org/ckw/section/ckw-technology">The  CKW technology page</a>, for details of the applications and backend</li>
<li><a href="http://grameenfoundation.force.com/ckw">The CKW Dashboard</a></li>
<li><a href="http://opendatakit.org/">The OpenDataKit website</a> for info on  the tools used to build the CKW apps</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2011/11/25/grameens-community-knowledge-worker-programme-an-i4d-case-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip of the Day: Create your own Admin Console in MMC</title>
		<link>http://www.dunxd.com/2011/11/04/tip-of-the-day-create-your-own-admin-console-in-mmc/</link>
		<comments>http://www.dunxd.com/2011/11/04/tip-of-the-day-create-your-own-admin-console-in-mmc/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 16:33:01 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[InfoTech]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=1152</guid>
		<description><![CDATA[Fed up of logging on to a server as admin to manage Active Directory etc?  Found that you can&#8217;t run Active Directory Users &#38; Computers as another user? Why not create an Admin Console that includes all the Snap Ins you use, and can be Run As an admin user during a regular session? Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Fed up of logging on to a server as admin to manage Active Directory etc?  Found that you can&#8217;t run Active Directory Users &amp; Computers as another user?</p>
<p>Why not create an Admin Console that includes all the Snap Ins you use, and can be Run As an admin user during a regular session?</p>
<p>Here&#8217;s how.</p>
<p><strong>Start &gt; Run &gt; mmc</strong></p>
<p><strong><a href="http://www.dunxd.com/files/2011/11/runmmc.png"><img class="alignnone size-medium wp-image-1159" title="runmmc" src="http://www.dunxd.com/files/2011/11/runmmc-300x154.png" alt="" width="300" height="154" /></a><br />
</strong></p>
<p>MMC opens in edit mode</p>
<p><a href="http://www.dunxd.com/files/2011/11/MMCEdit.png"><img class="alignnone size-medium wp-image-1156" title="MMCEdit" src="http://www.dunxd.com/files/2011/11/MMCEdit-300x143.png" alt="" width="300" height="143" /></a></p>
<p>File &gt; Add/Remove Snap in</p>
<p>Click Add button</p>
<p>Add the different snap ins you normally use &#8211; ADUC, DNS, Exchange, Event Log Viewer are some of mine.</p>
<p><a href="http://www.dunxd.com/files/2011/11/addremovesnap.png"><img class="alignnone size-medium wp-image-1154" title="addremovesnap" src="http://www.dunxd.com/files/2011/11/addremovesnap-270x300.png" alt="" width="270" height="300" /></a></p>
<p>Ok that, then save this MMC somewhere.</p>
<p>Now the tricky bit &#8211; running that MMC as a different user.</p>
<p>Create a shortcut to the MSC file:</p>
<p><a href="http://www.dunxd.com/files/2011/11/shortcuts.png"><img class="alignnone size-full wp-image-1153" title="shortcuts" src="http://www.dunxd.com/files/2011/11/shortcuts.png" alt="" width="166" height="94" /></a></p>
<p>Right click on the shortcut, and select Properties.</p>
<p>On the shortcut tab, click Advanced button.</p>
<p><a href="http://www.dunxd.com/files/2011/11/credentials.png"><img class="alignnone size-medium wp-image-1155" title="credentials" src="http://www.dunxd.com/files/2011/11/credentials-300x224.png" alt="" width="300" height="224" /></a></p>
<p>Ok out of the shortcut properties.</p>
<p>Now when you double click the Shortcut it will ask you for credentials &#8211; you are in!</p>
<p><a href="http://www.dunxd.com/files/2011/11/runas.png"><img class="alignnone size-medium wp-image-1157" title="runas" src="http://www.dunxd.com/files/2011/11/runas-300x245.png" alt="" width="300" height="245" /></a></p>
<p>Note &#8211; you may need to install Admin Tools to get the different Snap Ins &#8211; see <a href="http://support.microsoft.com/kb/314978">this Microsoft document on how to install different tools</a>.</p>
<p>Some of the snap-ins allow you to change the context &#8211; for example Event Viewer &#8211; you can change the server it is getting the logs for.  You can also set up multiple instances of some snap-ins &#8211; again, very useful if you want quick access to event logs on multiple servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2011/11/04/tip-of-the-day-create-your-own-admin-console-in-mmc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete all alerts for a user in Sharepoint with this PowerShell script</title>
		<link>http://www.dunxd.com/2010/12/22/delete-all-alerts-for-a-user-in-sharepoint-with-this-powershell-script/</link>
		<comments>http://www.dunxd.com/2010/12/22/delete-all-alerts-for-a-user-in-sharepoint-with-this-powershell-script/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 10:53:09 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=1093</guid>
		<description><![CDATA[When a user leaves an organisation, their account is usually cleaned up &#8211; either by disabling or deleting it.  In Sharepoint this cleaning up is not automatic &#8211; generally Sharepoint hangs on to user accounts so that information about that user is still linked to the documents the user worked on. One of the side [...]]]></description>
			<content:encoded><![CDATA[<p>When a user leaves an organisation, their account is usually cleaned up &#8211; either by disabling or deleting it.  In Sharepoint this cleaning up is not automatic &#8211; generally Sharepoint hangs on to user accounts so that information about that user is still linked to the documents the user worked on.  One of the side effects of this is that any alerts that user may have set up will remain, at least in Sharepoint 2007.  This leads to a lot of undeliverable messages going to Site Administrators.  Manually removing the alerts for a user requires visiting each site that has alerts, going to the site settings, User Alerts, finding the user and deleting their alerts.  I wrote the following PowerShell script to remove all alerts for a given user in one step.  The script requires my supporting functions script (Download <a href="http://www.dunxd.com/wp-content/uploads/2009/02/SPFunctions.zip"></a><a href="http://www.dunxd.com/files/2011/09/SPFunctions.zip">SPFunctions</a>) &#8211; you need to save this in the same directory as the script below.  It works in a similar way to my <a href="/2009/02/sharepoint-global-site-collection-administrator-editor-using-powershell/">Edit-SPAdmins script</a> &#8211; it allows you to select a Web Application via GUID (don&#8217;t worry, it lists all the Web Applications and their GUIDs), and then loops through all the site collections and sites, removing the users alerts as it goes.  So &#8211; on with the script (Download <a href="http://www.dunxd.com/wp-content/uploads/2010/12/delete-spalert.zip"><a href="http://www.dunxd.com/files/2010/12/delete-spalert.zip">delete-spalert</a></a>):</p>

<div class="wp_syntax"><div class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># Remove alerts for a given user from all SharePoint sites in a web application</span>
<span style="color: #008000;"># Usage:  delete-spalert.ps1</span>
<span style="color: #008000;"># Example:  delete-spalert.ps1 DOMAINUser</span>
&nbsp;
<span style="color: #008000;"># Validate arguments</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000080;">$args</span>.Count <span style="color: #FF0000;">-lt</span> <span style="color: #804000;">1</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;Usage: alerts.ps1 &quot;</span>
	<span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;Username must be in DOMAINuser format&quot;</span>
    exit
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># check that arguement is in correct format including domain</span>
<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000080;">$args</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span> <span style="color: #FF0000;">-inotmatch</span> <span style="color: #800000;">'^w+[\]w+$'</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-weight: bold;">Write-Warning</span> <span style="color: #800000;">&quot;Username must be in DOMAINUser format&quot;</span>
    exit
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Load Sharepoint functions</span>
.SPFunctions.ps1
&nbsp;
<span style="color: #008000;"># store arguement in variable</span>
<span style="color: #800080;">$myuser</span> <span style="color: pink;">=</span> <span style="color: #000080;">$args</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span>
&nbsp;
<span style="color: #008000;"># Preamble</span>
<span style="color: #008080; font-weight: bold;">cls</span>;
<span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #800000;">&quot;###################################################################################
&nbsp;
This application adds or removes alerts for a user in a specified web application
Here is a list of all Web Applications on the farm&quot;</span> <span style="color: #008080; font-style: italic;">-foregroundcolor</span> yellow;
&nbsp;
<span style="color: #008000;"># List the GUIDs of all web apps on this farm</span>
Get<span style="color: pink;">-</span>SPWebApplication <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ft</span> name<span style="color: pink;">,</span> id;
&nbsp;
<span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #800000;">&quot;Please copy the GUID for the web application you wish to use by selecting then
clicking the right mouse button.&quot;</span>  <span style="color: #008080; font-style: italic;">-foregroundcolor</span> yellow;
&nbsp;
<span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #800000;">&quot;
Note that the Central Admin site collection has no name,
but does have a GUID!  Don't select this one by accident!
&quot;</span> <span style="color: #008080; font-style: italic;">-foregroundcolor</span> red;
&nbsp;
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;You can paste the GUID by clicking the Right mouse button again&quot;</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> yellow;
<span style="color: #008000;"># Prompt user for GUID to use</span>
<span style="color: #800080;">$guid</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Read-Host</span> <span style="color: #008080; font-style: italic;">-Prompt</span> <span style="color: #800000;">&quot;GUID&quot;</span>;
<span style="color: #800080;">$guid</span> <span style="color: pink;">=</span> <span style="color: #800080;">$guid</span>.Trim<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #008000;"># Check GUID for correct format</span>
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Checking GUID&quot;</span>;
<span style="color: #0000FF;">switch</span><span style="color: #000000;">&#40;</span>Check<span style="color: pink;">-</span>GUID<span style="color: #000000;">&#40;</span><span style="color: #800080;">$guid</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
	<span style="color: #800000;">&quot;False&quot;</span> <span style="color: #000000;">&#123;</span> <span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Error: Invalid GUID.  Exiting...&quot;</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> red; <span style="color: #0000FF;">return</span>;<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008000;"># Get the specified web app</span>
<span style="color: #800080;">$webapp</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPWebApp<span style="color: #000000;">&#40;</span><span style="color: #800080;">$guid</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #008000;"># Check that webapp has been got and if not inform user</span>
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;The following Web App will be affected: $($webapp.name)&quot;</span>
<span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;You will be removing alerts for the following user: $myuser&quot;</span>
&nbsp;
<span style="color: #800080;">$continue</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Read-Host</span> <span style="color: #008080; font-style: italic;">-Prompt</span> <span style="color: #800000;">&quot;Continue? (y|n)&amp;gt;&quot;</span>;
<span style="color: #0000FF;">switch</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$continue</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
	<span style="color: #800000;">&quot;y&quot;</span> <span style="color: #000000;">&#123;</span><span style="color: #0000FF;">break</span>;<span style="color: #000000;">&#125;</span>
	default <span style="color: #000000;">&#123;</span><span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Exiting...&quot;</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> red; <span style="color: #0000FF;">return</span>;<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #800080;">$alertcount</span> <span style="color: pink;">=</span> <span style="color: #804000;">0</span>
&nbsp;
<span style="color: #008000;"># For each site collection remove all alerts for the given user</span>
<span style="color: #800080;">$time</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">Measure-Command</span> <span style="color: #000000;">&#123;</span>
    <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$site</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$webapp</span>.Sites<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        <span style="color: #008000;"># get the collection of webs</span>
        <span style="color: #800080;">$webs</span> <span style="color: pink;">=</span> <span style="color: #800080;">$site</span>.AllWebs
        <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$web</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$webs</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #008000;"># get the alerts</span>
            <span style="color: #800080;">$alerts</span> <span style="color: pink;">=</span> <span style="color: #800080;">$web</span>.Alerts
&nbsp;
            <span style="color: #008000;"># if more than 0 alerts, iterate through these alerts to see if there is one for the user</span>
            <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$alerts</span>.Count <span style="color: #FF0000;">-gt</span> <span style="color: #804000;">0</span><span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                <span style="color: #800080;">$myalerts</span> <span style="color: pink;">=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
                <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$alert</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$alerts</span><span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$alert</span>.User.LoginName <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$myuser</span><span style="color: #000000;">&#41;</span>
                    <span style="color: #000000;">&#123;</span>
                        <span style="color: #008080; font-weight: bold;">echo</span> <span style="color: #800000;">&quot;Deleting $($alert.Title)&quot;</span>
                        <span style="color: #800080;">$myalerts</span> <span style="color: pink;">+=</span> <span style="color: #800080;">$alert</span>
                        <span style="color: #800080;">$alertcount</span><span style="color: pink;">++</span>
                    <span style="color: #000000;">&#125;</span>
                <span style="color: #000000;">&#125;</span>
&nbsp;
                <span style="color: #008000;"># now we have alerts for this site, we can delete them</span>
                <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$alertdel</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$myalerts</span><span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    <span style="color: #800080;">$alerts</span>.Delete<span style="color: #000000;">&#40;</span><span style="color: #800080;">$alertdel</span>.ID<span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #008080; font-weight: bold;">echo</span> <span style="color: #800000;">&quot;Deleted $alertcount alerts in $($time.TotalSeconds) seconds&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2010/12/22/delete-all-alerts-for-a-user-in-sharepoint-with-this-powershell-script/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Useful coloured command prompt for Linux</title>
		<link>http://www.dunxd.com/2010/10/22/useful-coloured-command-prompt-for-linux/</link>
		<comments>http://www.dunxd.com/2010/10/22/useful-coloured-command-prompt-for-linux/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 10:50:46 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[InfoTech]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=1088</guid>
		<description><![CDATA[I find it useful to have a visual prompt when I am logged into a Linux server as root (something you should rarely do).  One way of doing this is by adding colour to your command line prompt.  I decided to colour the username green if logged in as a regular user, and red if [...]]]></description>
			<content:encoded><![CDATA[<p>I find it useful to have a visual prompt when I am logged into a Linux server as root (something you should rarely do).  One way of doing this is by adding colour to your command line prompt.  I decided to colour the username green if logged in as a regular user, and red if logged in as root.</p>
<p>It looks like this:</p>
<pre><span style="background-color: gray;color: white">[<span style="color: #00ff00">username</span>@hostname ~]$ </span></pre>
<p>and when logged in as root:</p>
<pre><span style="background-color: gray;color: white">[<span style="color: #ff0000">root</span>@hostname ~]# </span></pre>
<p>Here&#8217;s how to do it.  While logged in as yourself, edit your .bashrc file and change the export PS1 line so it reads like this:</p>
<pre>export PS1='[e[0;32m][u[e[m]@h W]$ '</pre>
<p>Now su to root, and edit it&#8217;s .bashrc file changing export PS1 to this:</p>
<pre>export PS1='[[e[0;31m]u[e[m]@h W]$ '</pre>
<p>That easy.  You can do <a href="http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html">a lot more things with your command prompt</a>, but this is enough for me.  <a href="http://drnathan.teamhackaday.com/2009/04/03/fix-your-linux-terminal-line-wrap-issues/">Be careful when using non-printing characters</a> (such as the colour commands above).  These should be surrounded by escape block ([ and ]).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2010/10/22/useful-coloured-command-prompt-for-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How the hell do Sharepoint 2007 permissions work?</title>
		<link>http://www.dunxd.com/2010/09/23/how-the-hell-do-sharepoint-2007-permissions-work/</link>
		<comments>http://www.dunxd.com/2010/09/23/how-the-hell-do-sharepoint-2007-permissions-work/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 15:16:40 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[sharepoint security]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=1050</guid>
		<description><![CDATA[I&#8217;ve written about this before, but today I found myself explaining the whole permissioning thing to a colleague, and put together a diagram which shows how inheritance works.  Permissions and groups are inherited as follows: This shows &#8220;Administrative&#8221; rights, but can equally be applied to other permissions at any level below a site collection. Dotted [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="/2009/06/where-to-set-sharepoint-admin-permissions/">written about this before</a>, but today I found myself explaining the whole permissioning thing to a colleague, and put together a diagram which shows how inheritance works.  Permissions and groups are inherited as follows:</p>
<p><a href="http://www.dunxd.com/files/2010/09/sp_permissions_inheritance.png"><img class="aligncenter size-full wp-image-1051" src="http://www.dunxd.com/files/2010/09/sp_permissions_inheritance.png" alt="Sharepoint Permissions Inheritance" width="546" height="493" /></a></p>
<p>This shows &#8220;Administrative&#8221; rights, but can equally be applied to other permissions at any level below a site collection. Dotted boundaries show where the inheritance are optional (and shouldn&#8217;t really be called inheritance either).</p>
<p>To explain this a little further let&#8217;s start at the top:</p>
<h2>Web application level</h2>
<p>The Policy for Web Application setting allows you to give Active Directory users and groups rights over all Site Collections in that Web Application.  If you give a user or group Full Access permissions at this level, they will have access to all the settings pages for all sites in the web application.  These users and groups names do not show up in any Sharepoint groups or permissions pages.</p>
<h2>Site Collection level</h2>
<p>When creating a site collection you can set Primary and Secondary Site Collection Administrators.  These can only be set as Active Directory user accounts.  These users get access to all settings pages for the sites within the site collection (including the root site /).  Emails sent by Sharepoint relating to sites in the site collection appear to come from the Primary Site Collection Administrator.</p>
<p>To update all your Site Collection Administrators in one go, take a look at <a href="/2008/12/administering-sharepoint-some-perspectives/#update_site_collection_owners">my Sharepoint 2007 PowerShell scripts</a>.</p>
<h2>Sites</h2>
<p>This is the level that the groups you can administer within Sharepoint become available, and what most people think of when they think of permissions in Sharepoint.</p>
<p>An important point to note is that there is always a root site within a site collection &#8211; this is accessed at the root of the site collection directory (/).  All other sites in the site collection are subsites (or subsites of subsites) of this site.  The groups and permissions you set up for this root site can be used by the other sites in the collection.</p>
<p>This all gets a bit complicated, so lets use an example to illustrate.</p>
<p><a href="http://www.dunxd.com/files/2010/09/sp_perms_inherit2.png"><img class="aligncenter size-full wp-image-1058" src="http://www.dunxd.com/files/2010/09/sp_perms_inherit2.png" alt="Illustrative example of site collection with subsites" width="338" height="309" /></a></p>
<p>We&#8217;ve got a site collection with a root site at http://dunxd/sites/teams/.  Within this site there are two subsites &#8211; a and b.  Site a has a subsite 1.</p>
<p>When we create the site collection (and root site), Sharepoint will set up the following groups:</p>
<ul>
<li>Teams owners &#8211; this is for users who can administer the root site.  They won&#8217;t see the Site Collection admin links unless they are included in one of the higher level permissions described above.</li>
<li>Teams members &#8211; this is for users who need to be able to work on content in the site</li>
<li>Teams visitors &#8211; this is for users who only require read access to the site</li>
</ul>
<p>When we create subsite <em>a</em>, we have the choice of <strong>using the same permissions as the parent site</strong>. If we choose that, subsite <em>a </em>will not have any additional groups created.  Owners of the <em>Teams </em>site will also be owners of the <em>a</em> site, and so on.</p>
<p>Note that here we are simply using the groups &#8211; once these have been set up, we can change the permissions those groups have for site <em>a</em> without changing the permissions they have for site <em>Teams</em>.  Also note that if we add a user to the Teams owners group, that user will also have the Owner permissions on site <em>a</em>.</p>
<p>We also have the choice of <strong>using unique permissions</strong>.  If we choose that, additional groups <em>may</em> be created, <em>or</em> we may use existing groups for each of the Owner, Member and Visitor roles.  The default options in this situation are to share the parent Visitors group, and create new Member and Owner groups specifically for the site.</p>
<p>When we come to create a subsite of site <em>a </em>called site <em>1</em>, we get the same options for using parent permissions or unique permissions.  If we use the parent permissions, we get whatever we set for the parent site &#8211; if we used the permissions for <em>Teams </em>in site <em>a</em> then site 1 will also have <em>Teams owners</em> as owner and so on.  If we select to use unique permissions for site 1,  we can create <em>1 Owners</em> etc, or we can use <em>a owners</em>, or even <em>Teams owners</em>.  <strong>A site can access all the groups in the parent sites above it</strong>.</p>
<p>This is quite a major departure from the way that normal file system permissions work.  It&#8217;s also quite difficult to explain.  I hope this post helps you if you need to understand this, or explain to someone else.</p>
<p>With any luck you didn&#8217;t need to read 800 words &#8211; the diagram explained it for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2010/09/23/how-the-hell-do-sharepoint-2007-permissions-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting User Profile Properties out of Sharepoint and into a table</title>
		<link>http://www.dunxd.com/2010/07/05/getting-user-profile-properties-out-of-sharepoint/</link>
		<comments>http://www.dunxd.com/2010/07/05/getting-user-profile-properties-out-of-sharepoint/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 09:03:15 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=874</guid>
		<description><![CDATA[One of the shortcomings of Sharepoint 2007 is the lack of a tabular view of User Profile Properties.  This would be really useful, so I wrote a PowerShell script which gets specified profile properties for every user and writes them into a delimited file. First up however, you need a list of the profile property [...]]]></description>
			<content:encoded><![CDATA[<p>One of the shortcomings of Sharepoint 2007 is the lack of a tabular view of User Profile Properties.  This would be really useful, so I wrote a PowerShell script which gets specified profile properties for every user and writes them into a delimited file.</p>
<p>First up however, you need a list of the profile property names so you know what to select.  The following PowerShell script will display a table showing the internal name used by Sharepoint, and the property name displayed in the Sharepoint UI (Download <a href="http://www.dunxd.com/wp-content/uploads/2010/07/Get-UserProfileConfigManager.zip">Get-UserProfileConfigManager</a>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># Outputs a list of User profile names - both the internal name, and the name displayed in Sharepoint</span>
&nbsp;
<span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">System.Reflection.Assembly</span><span style="color: #000000;">&#93;</span>::<span style="color: #800000;">LoadWithPartialName</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.Office.Server&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">System.Reflection.Assembly</span><span style="color: #000000;">&#93;</span>::<span style="color: #800000;">LoadWithPartialName</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.Office.Server.UserProfiles&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #008000;"># Function:          Get-UserProfileConfigManager</span>
<span style="color: #008000;"># Description:       return a UserProfileConfigManager object which is used for management of MOSS User Profiles</span>
<span style="color: #008000;"># Parameters:        SSPName          Shared Service Provider Name    </span>
&nbsp;
<span style="color: #0000FF;">Function</span> global:Get<span style="color: pink;">-</span>UserProfileConfigManager<span style="color: #000000;">&#40;</span><span style="color: #800080;">$SSPName</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #800080;">$ServerContext</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>Microsoft.Office.Server.ServerContext<span style="color: #000000;">&#93;</span>::GetContext<span style="color: #000000;">&#40;</span><span style="color: #800080;">$SSPName</span><span style="color: #000000;">&#41;</span>;
<span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.Office.Server.UserProfiles.UserProfileConfigmanager<span style="color: #000000;">&#40;</span><span style="color: #800080;">$servercontext</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #800080;">$cm</span><span style="color: pink;">=</span>Get<span style="color: pink;">-</span>UserProfileConfigManager<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;SharedServices&quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #800080;">$cm</span>.getProperties<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ft</span> name<span style="color: pink;">,</span>displayname</pre></td></tr></table></div>

<p>The output from this can be used to determine the names of the properties you want to use in the next script.  To use this script, update the  $arProperties list with the property names you need.  By default this saves the results to a file UserProfiles.csv in the directory from which you run the script.  You can then import this into Excel or whatever (Download <a href="http://www.dunxd.com/wp-content/uploads/2010/07/Get-UserProfiles-To-CSV.zip">Get-UserProfiles-To-CSV</a>).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># Outputs a delimited file with specified user profile properties for each user in Sharepoint</span>
&nbsp;
<span style="color: #008000;"># Create array of desired properties</span>
<span style="color: #800080;">$arProperties</span> <span style="color: pink;">=</span> <span style="color: #800000;">'UserName'</span><span style="color: pink;">,</span><span style="color: #800000;">'FirstName'</span><span style="color: pink;">,</span><span style="color: #800000;">'LastName'</span><span style="color: pink;">,</span><span style="color: #800000;">'Title'</span><span style="color: pink;">,</span><span style="color: #800000;">'WorkEmail'</span><span style="color: pink;">,</span><span style="color: #800000;">'WorkPhone'</span><span style="color: pink;">,</span><span style="color: #800000;">'Manager'</span><span style="color: pink;">,</span><span style="color: #800000;">'AlternateContact'</span><span style="color: pink;">,</span><span style="color: #800000;">'RoleDescription'</span><span style="color: pink;">,</span><span style="color: #800000;">'PictureURL'</span>;
<span style="color: #008000;"># Specify output file</span>
<span style="color: #800080;">$outfile</span> <span style="color: pink;">=</span> <span style="color: #800000;">'UserProfiles.csv'</span>;
<span style="color: #008000;">#Specify delimiter character (i.e. not one that might appear in your user profile data)</span>
<span style="color: #800080;">$delim</span> <span style="color: pink;">=</span> <span style="color: #800000;">'^'</span>;
<span style="color: #008000;"># Specify Shared Service Provider that contains the user profiles.</span>
<span style="color: #800080;">$SSP</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;SharedServices&quot;</span>;
&nbsp;
<span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">System.Reflection.Assembly</span><span style="color: #000000;">&#93;</span>::<span style="color: #800000;">LoadWithPartialName</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.Office.Server&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#91;</span>void<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">System.Reflection.Assembly</span><span style="color: #000000;">&#93;</span>::<span style="color: #800000;">LoadWithPartialName</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;Microsoft.Office.Server.UserProfiles&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># Function:          Get-UserProfiles</span>
<span style="color: #008000;"># Description:       return a UserProfileManager object containing all user profiles</span>
<span style="color: #008000;"># Parameters:        SSPName          SSPName</span>
&nbsp;
<span style="color: #0000FF;">Function</span> global:Get<span style="color: pink;">-</span>UserProfiles<span style="color: #000000;">&#40;</span><span style="color: #800080;">$SSPName</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #800080;">$ServerContext</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span>Microsoft.Office.Server.ServerContext<span style="color: #000000;">&#93;</span>::GetContext<span style="color: #000000;">&#40;</span><span style="color: #800080;">$SSPName</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #800080;">$UPManager</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">new-object</span> Microsoft.Office.Server.UserProfiles.UserProfileManager<span style="color: #000000;">&#40;</span><span style="color: #800080;">$ServerContext</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #0000FF;">return</span> <span style="color: #800080;">$UPManager</span>.GetEnumerator<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
<span style="color: #800080;">$profiles</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>UserProfiles<span style="color: #000000;">&#40;</span><span style="color: #800080;">$SSP</span><span style="color: #000000;">&#41;</span>;
&nbsp;
<span style="color: #008000;">#Initialise Output file with headings</span>
<span style="color: #800080;">$header</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span>::join<span style="color: #000000;">&#40;</span><span style="color: #800080;">$delim</span><span style="color: pink;">,</span><span style="color: #800080;">$arProperties</span><span style="color: #000000;">&#41;</span>;
<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800080;">$header</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out<span style="color: #FF0000;">-File</span></span> <span style="color: #800080;">$outfile</span>
&nbsp;
<span style="color: #008000;">#Output the specified properties for each</span>
<span style="color: #800080;">$profiles</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">ForEach-Object</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #0000FF;">foreach</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$p</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$arProperties</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
		<span style="color: #008000;"># Get the property name and add it to a new array, which will be used to construct the result string</span>
		<span style="color: #800080;">$arProfileProps</span> <span style="color: pink;">+=</span> <span style="color: #000080;">$_</span>.Item<span style="color: #000000;">&#40;</span><span style="color: #800080;">$p</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #000000;">&#125;</span>
	<span style="color: #800080;">$results</span> <span style="color: pink;">=</span> <span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span>::join<span style="color: #000000;">&#40;</span><span style="color: #800080;">$delim</span><span style="color: pink;">,</span><span style="color: #800080;">$arProfileProps</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #008000;"># Get rid of any newlines that may be in there.</span>
	<span style="color: #800080;">$CleanResults</span> <span style="color: pink;">=</span> <span style="color: #800080;">$results</span>.Replace<span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;<span style="color: #008080; font-weight: bold;">`n</span>&quot;</span><span style="color: pink;">,</span><span style="color: #800000;">''</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #008080; font-weight: bold;">Write-Output</span> <span style="color: #800080;">$CleanResults</span>
	<span style="color: #008080; font-weight: bold;">Remove-Variable</span> <span style="color: #008080; font-style: italic;">-Name</span> arProfileProps
<span style="color: #000000;">&#125;</span> <span style="color: pink;">|</span> <span style="color: #008080; font-weight: bold;">Out<span style="color: #FF0000;">-File</span></span> <span style="color: #008080; font-style: italic;">-Append</span> $outfile</pre></td></tr></table></div>

<p>The next stage of development would be to pipe the output of the first script into the second, instead of setting up a list of desired properties &#8211; it is probably more useful to just grab everything.</p>
<p>I&#8217;m sure this could be written much more gracefully, but I can&#8217;t work out how to iterate through the UserProfile.Item array/object.  Any suggestions gratefully received!</p>
<p>Download <a href="http://www.dunxd.com/wp-content/uploads/2010/07/SharepointUserProfilePowerShell.zip">Sharepoint User Profile PowerShell scripts</a> here (zip file).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2010/07/05/getting-user-profile-properties-out-of-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on Windows Network Load Balancing</title>
		<link>http://www.dunxd.com/2010/06/29/notes-on-windows-network-load-balancing/</link>
		<comments>http://www.dunxd.com/2010/06/29/notes-on-windows-network-load-balancing/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 20:50:52 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=830</guid>
		<description><![CDATA[Network Load Balancing simply round robins between servers, and makes sure that any client goes to the same host (called affinity) so that the client always reaches the same host in case it has a session on it. As such, any problems with SharePoint related to performance will not have anything to do with NLB, [...]]]></description>
			<content:encoded><![CDATA[<p>Network Load Balancing simply round robins between servers, and makes sure that any client goes to the same host (called <em>affinity</em>) so that the client always reaches the same host in case it has a session on it.</p>
<p>As such, any problems with SharePoint related to performance will <strong>not </strong>have anything to do with NLB, as all it does is decide which host a client will send requests to.  Rather such problems would be down to one of the web front ends responding slowing &#8211; usually down to the application pool needing to free up memory, which should happen automatically after a while.  Where NLB confuses things is that you can&#8217;t easily tell which WFE a client machine is talking to.</p>
<p>If NLB is not working, the only likely symptom would be that no requests to the NLB IP address would work.  If you can ping your NLB IP address, then NLB is working.</p>
<p>You can check Network Load Balancing by going to Start &gt; Administrative Tools and running Network Load Balancing (most likely you have this on your PC).  You need to connect to one of the nodes involved.  You can then see the status of the nodes. This should always be checked first in case one of the nodes has stopped responding on the NLB address).  You should also use this interface to drainstop a node before taking it offline for any reason &#8211; that way you get as graceful as possible a handover of affinities.</p>
<p><em>Update: </em>It seems that in certain circumstances, NLB can come apart under load.  We recently switched from two high end Cisco core switches to two stacks of three Dell PowerConnect 6048 switches.  Since then NLB works, but as soon as we get moderate load coming to the NLB address, Sharepoint grinds to a halt.  Dell are chasing this, and we are promised a fix soon &#8211; until then no NLB &#8211; we can&#8217;t roll back to our Cisco switches.  Christian Aid isn&#8217;t such a huge organisation (~800 staff worldwide), but heavy users of Sharepoint for file storage &#8211; seems enough to break NLB.  I think it is something to do with the multicast hack Microsoft use to make NLB work &#8211; but I&#8217;d better wait to hear back from Dell and get it working before I can say for sure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2010/06/29/notes-on-windows-network-load-balancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dell Switches and VMware</title>
		<link>http://www.dunxd.com/2010/04/14/dell-switches-and-vmware/</link>
		<comments>http://www.dunxd.com/2010/04/14/dell-switches-and-vmware/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:20:11 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[InfoTech]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=832</guid>
		<description><![CDATA[We recently swapped out our Cisco 6500 core switch, replacing it with a much cheaper pair of Dell PowerConnect 6248 stacks.  One of the first issues that came up after the swap over was that VMware High Availability stopped working.  The error message was that each VMware host could not communicate with its isolation address. [...]]]></description>
			<content:encoded><![CDATA[<p>We recently swapped out our Cisco 6500 core switch, replacing it with a much cheaper pair of Dell PowerConnect 6248 stacks.  One of the first issues that came up after the swap over was that VMware High Availability stopped working.  The error message was that each VMware host could not communicate with its isolation address.</p>
<p>By default VMware hosts ping their default gateway to determine whether or not they are isolated from the cluster.  However, if you are running a pair of Dell PowerConnect switches using VRRP for redundancy, the VRRP IP address is not pingable (I&#8217;m not sure why Dell set this up &#8211; this isn&#8217;t the case with Cisco&#8217;s HSRP equivalent).  So the solution to the problem was to nominate another device in the same subnet as the Service Console as an isolation address and force VMware to use this.  We nominated our monitoring server, as we attempt to keep this running 24/7.  You need to go to the Advanced Settings for VMware HA, and set <em>das.isolationaddress</em> to the IP of the device you will be pinging, and then create a new variable <em>das.usedefaultisolationaddress</em> and set that to <em>false</em>.  After doing this, disable HA, then once that has completed, reenable.</p>
<p>HA should work fine after that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2010/04/14/dell-switches-and-vmware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where to set Sharepoint Admin Permissions</title>
		<link>http://www.dunxd.com/2009/06/30/where-to-set-sharepoint-admin-permissions/</link>
		<comments>http://www.dunxd.com/2009/06/30/where-to-set-sharepoint-admin-permissions/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:45:46 +0000</pubDate>
		<dc:creator>dunxd</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://www.dunxd.com/?p=779</guid>
		<description><![CDATA[There are a lot of places in Sharepoint where you can assign permissions.  This is intended as a summary of where administrative level permissions can be assigned.]]></description>
			<content:encoded><![CDATA[<div class="ExternalClassDED9B5C015104855B73BBED7BCB900D4">
<p>There are a <strong>lot</strong> of places in Sharepoint where you can assign  permissions.  This is intended as a summary of where administrative level  permissions can be assigned.</p>
<h3>Site Collection Users and Groups</h3>
<p>This is set per site collection.  Super user and regular user permissions to  children of the site collection are set here.  These permissions can be  inherited by an site collection child, including sub-sites.  Giving a user Full  Control here does not give Site Collection Admin level control as might be  assumed, but does give enough functionality for many things.</p>
<h3>Site Collection Administrators</h3>
<p>This can be set through the Site Collection Site Settings if you are already  a Site Collection Administrator, or owner or secondary contact &#8211; i.e. existing  site collection administators can add other people.  You cannot add AD groups to  this list, so Site Collection Administrators must be listed individually.   Owners and Secondary Contacts are automatically Site Collection Administrators  whether they are listed as such or not.</p>
<p>Site Collection Administrators is the highest level permission that can be  given to a site collection.  A Farm Administrator does not automatically inherit  this permission (but see below) but can add themselves to the a specific Site  Collection&#8217;s Administrators list through Central Administration &gt; Application  management &gt; Site Collection Administrators.</p>
<h3>Policy for Web Application</h3>
<p>Here you can give Site Collection Administrator type permissions to all Site  Collections in a Web Application (e.g. <a href="http://division/">http://division</a>).  This can be useful for setting up  admin accounts.</p>
<h3>SSP Users and Groups</h3>
<p>Access to some, but not all, SSP functions can be assigned via the SSP Users  and groups page.</p>
<h3>SSP Site Collection Administrators</h3>
<p>If you are not on this list, you cannot access the Search Usage Report</p>
<h3>SSP Web Application Policy</h3>
<p>As for any other site collection, you can add an AD group as Site Collection  Administrator by adding the group to this list.</p>
<h3>Personalisation Services Permissions</h3>
<p>Set up specific users who need to manage profiles and MySites in here.  You  also need to set up these users under the Policy for Web Application for your  MySites Web Application or they won&#8217;t be able to admin mysites fully.</p>
<h3>Business Data Catalog Permissions</h3>
<p>If you use these, then you need permissions in here for administration.</p>
<h3>Central Admin Site Users and Groups</h3>
<p>Some functionality can be given here, but mainly you will be able to see the  menu, but not do anything.</p>
<h3>Central Admin Site Site Collection Administrators</h3>
<p>Here you get the real power over Sharepoint.</p>
<h3>Policy for Central Admin Web Application</h3>
<p>Again &#8211; useful for assigning admin permissions by AD group.</p>
<p>Phew &#8211; that is a lot of places, and possibly not an exhaustive list.  Does anyone actually need this level of  granularity?  Even if that is the case, could this have been made easier through  better thought out admin pages, and better labelling?  I am sure that <a href="http://www.amazon.co.uk/Design-Everyday-Things-Don-Norman/dp/0465067107/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1246373015&amp;sr=1-3">Donald  Norman</a> and <a href="http://www.amazon.co.uk/Cognitive-Style-PowerPoint-Pitching-Corrupts/dp/0961392169/ref=sr_1_3?ie=UTF8&amp;s=books&amp;qid=1246373056&amp;sr=1-3">Edward  Tufte</a> would have a lot to say about Sharepoint admin!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dunxd.com/2009/06/30/where-to-set-sharepoint-admin-permissions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

