<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Joe-IT: Technology done right</title>
	<atom:link href="http://joeit.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joeit.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 01:17:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='joeit.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Joe-IT: Technology done right</title>
		<link>http://joeit.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://joeit.wordpress.com/osd.xml" title="Joe-IT: Technology done right" />
	<atom:link rel='hub' href='http://joeit.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to use Gmail to manage contacts on an iPhone</title>
		<link>http://joeit.wordpress.com/2012/01/23/how-to-use-gmail-to-manage-contacts-on-an-iphone/</link>
		<comments>http://joeit.wordpress.com/2012/01/23/how-to-use-gmail-to-manage-contacts-on-an-iphone/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 06:01:14 +0000</pubDate>
		<dc:creator>Joe G.</dc:creator>
				<category><![CDATA[Ask an IT ninja!!!]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=488</guid>
		<description><![CDATA[When I first moved to an iPhone, I lost all of my contacts after an update to iOS (good old iTunes and its corrupt backups). I had just gotten the phone, so there were not many contacts to lose, and I had them backed up in an excel spreadsheet. But I learned not to ever [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=488&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I first moved to an iPhone, I lost all of my contacts after an update to iOS (good old iTunes and its corrupt backups). I had just gotten the phone, so there were not many contacts to lose, and I had them backed up in an excel spreadsheet. But I learned not to ever trust Apple with my data.</p>
<p>After doing a little bit of research, I discovered that I could use Gmail to manage my contacts, which is a great solution because it integrates with iOS 4+ really well and also because it gets my contacts online.</p>
<p>This is optional, but if you already have contacts in your iPhone you&#8217;ll want to import them into Gmail. Unfortunately the easiest way to do this is using iTunes (after this is done if you have iOS 5+ installed you&#8217;ll only need iTunes to sync music and ringtones).</p>
<p>You can use iTunes to upload existing Contacts from your Apple device to Gmail. Only the following information can be uploaded:</p>
<ul>
<li>People&#8217;s names and job titles</li>
<li>Company names</li>
<li>Email and postal addresses</li>
<li>Phone numbers</li>
<li>IM names, including the type of service</li>
<li>Notes</li>
</ul>
<p>Other information, like custom ringtones and photos, are not uploaded. Please sync them to Outlook first.</p>
<h2>Contact Upload Instructions</h2>
<ul>
<li>Connect your iPhone, iPad, or iPod Touch to your computer using the USB cable.</li>
<li>Open the <strong>iTunes</strong> application.</li>
<li>Select your iPhone and click the <strong>Info</strong> tab.</li>
<li>Check the <strong>Sync Contacts with</strong> option and select <strong>Google Contacts</strong> from the drop-down menu.</li>
<li>Click <strong>Configure</strong> and enter your Google username and password.</li>
</ul>
<p><img src="http://www.google.com/help/hc/images/mobile_138744_en.gif" alt="" /></p>
<ul>
<li>Press <strong>Apply</strong> to sync your device with iTunes.</li>
<li>Once you&#8217;ve checked that your contacts are available on the web, disable iTunes Contacts sync with Google. If you don&#8217;t do this, you&#8217;ll see duplicate contacts on your phone.</li>
</ul>
<p>Now that you have your iPhone contacts in Gmail, you can setup Gmail using an Exchange connection and specify that account for default contacts creation.</p>
<h2>Getting Started</h2>
<p>1. Open the <strong>Settings</strong> application on your device&#8217;s home screen.<br />
2. Open <strong>Mail, Contacts, Calendars.</strong><br />
3. Press <strong>Add Account&#8230;</strong>.<br />
4. Select <strong>Microsoft Exchange</strong>. iOS 4.0+ allows multiple Exchange accounts. However, if you&#8217;re on a device that doesn&#8217;t let you add a second account, you could also use <a href="http://www.google.com/support/mobile/bin/answer.py?answer=151674">CalDAV</a> to sync Google Calendar and <a href="https://mail.google.com/support/bin/answer.py?hl=en&amp;answer=77702">IMAP</a> to sync Gmail.</p>
<p><img src="http://www.google.com/help/hc/images/mobile_138740a_en.gif" alt="settings mail calendar contacts on iphone" />  <img src="http://www.google.com/help/hc/images/mobile_138740b_en.gif" alt="add mail calendar contacts account on iphone" />  <img src="http://www.google.com/help/hc/images/mobile_138740c_en.gif" alt="microsoft exchange" /></p>
<h2>Enter Account Info</h2>
<p>5. In the <strong>Email</strong> field, enter your full Google Account email address. If you use an @googlemail.com address, you may see an &#8220;Unable to verify certificate&#8221; warning when you proceed to the next step.<br />
6. Leave the <strong>Domain</strong> field blank.<br />
7. Enter your full Google Account email address as the <strong>Username</strong>.<br />
8. Enter your Google Account password as the <strong>Password</strong>.</p>
<h4><strong>Notes about passwords:</strong></h4>
<ul>
<li>Be sure that you have a <a href="http://support.google.com/accounts/bin/answer.py?&amp;answer=32040" target="_blank">strong password</a> for your Google Account.</li>
<li>If you see an error message saying &#8220;Invalid Password&#8221;, you may need to unlock your account by solving a short CAPTCHA. Go to <a href="https://www.google.com/accounts/UnlockCaptcha">https://www.google.com/accounts/UnlockCaptcha</a>.</li>
<li>If you are a <a href="http://www.google.com/support/accounts/bin/static.py?page=guide.cs&amp;guide=1056283&amp;topic=1056284" target="_blank">2-step verification user</a>, please use an <a href="https://www.google.com/accounts/IssuedAuthSubTokens">application-specific password</a> instead of your regular password in this field.</li>
</ul>
<p>9. Tap <strong>Next</strong> at the top of your screen.<br />
9a. Choose <strong>Cancel</strong> if the <strong>Unable to Verify Certificate</strong> dialog appears.<br />
10. When the new <strong>Server</strong> field appears, enter <strong>m.google.com</strong>.<br />
11. Press <strong>Next</strong> at the top of your screen again.</p>
<p><img src="http://www.google.com/help/hc/images/mobile_138740h_en.gif" alt="exchange domain" />  <img src="http://www.google.com/help/hc/images/mobile_138740d_en.gif" alt="exchange server" /></p>
<h2>Enable Mail and Calendar</h2>
<p>12. Select the Google services (Mail, Calendar, and Contacts) you want to sync. To receive and respond to meeting requests on your device, both <strong>Mail</strong> and <strong>Calendar</strong> need to be turned on, and <strong>New Invitations</strong> needs to be enabled in your Google Calendar settings.</p>
<p>To enable <strong>New Invitations</strong>, sign in to your Google Calendar using the web browser on your phone or computer. Go to <strong>Calendar Settings &gt; Calendars &gt;</strong> Click on the <strong>Notifications</strong> for the calendar you want to sync. Under <strong>Email</strong> check <strong>New Invitations</strong> (and any of the other Invitation settings you want enabled), and click <strong>Save</strong>.</p>
<p>13. Unless you want to delete all the existing Contacts and Calendars on your phone, select the <strong>Keep on my iPhone</strong> (or iPad or iPod touch) option when prompted. This will also allow you to keep syncing with your computer via iTunes.</p>
<p>If you want to sync only the <strong>My Contacts</strong> group, you must choose to <strong>Delete Existing Contacts</strong> during the Google Sync install when prompted. If you choose to keep existing contacts, it will sync the contents of the <strong>All Contacts</strong> group instead. If there are no contacts on your phone, the latter will happen &#8212; the contents of your <strong>All Contacts</strong> group will be synced.</p>
<p><img src="http://www.google.com/help/hc/images/mobile_138740e_en.gif" alt="iphone exchange mail calendars contacts" />  <img src="http://www.google.com/help/hc/images/mobile_138740i_keep_content_en.gif" alt="exchange keep on my iphone" /></p>
<h2>Set Gmail as the default account for new contacts</h2>
<p>To do this, select <strong>Settings</strong>  &gt;  <strong>Mail, Contacts, Calendars</strong>  &gt;  Scroll to the <strong>Contacts Section</strong>  &gt;  <strong>Default Account</strong>  &gt;  Change <em>FROM</em> <strong>On My iPhone</strong> <em>TO</em> <strong>(whatever you named your Gmail account)</strong>.</p>
<p>Now, whenever you create a contact on your iPhone, it will automatically sync to Google!</p>
<p><a href="http://joeit.files.wordpress.com/2010/04/end.jpg"><img class="aligncenter size-full wp-image-254" title="end.jpg" src="http://joeit.files.wordpress.com/2010/04/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/488/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/488/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/488/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=488&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2012/01/23/how-to-use-gmail-to-manage-contacts-on-an-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9d184d6baa02e7fdba58b4e5cd7aed82?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">jglessner</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138744_en.gif" medium="image" />

		<media:content url="http://www.google.com/help/hc/images/mobile_138740a_en.gif" medium="image">
			<media:title type="html">settings mail calendar contacts on iphone</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138740b_en.gif" medium="image">
			<media:title type="html">add mail calendar contacts account on iphone</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138740c_en.gif" medium="image">
			<media:title type="html">microsoft exchange</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138740h_en.gif" medium="image">
			<media:title type="html">exchange domain</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138740d_en.gif" medium="image">
			<media:title type="html">exchange server</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138740e_en.gif" medium="image">
			<media:title type="html">iphone exchange mail calendars contacts</media:title>
		</media:content>

		<media:content url="http://www.google.com/help/hc/images/mobile_138740i_keep_content_en.gif" medium="image">
			<media:title type="html">exchange keep on my iphone</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2010/04/end.jpg" medium="image">
			<media:title type="html">end.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Function: Remove-ADPhoto</title>
		<link>http://joeit.wordpress.com/2011/12/02/powershell-function-remove-adphoto/</link>
		<comments>http://joeit.wordpress.com/2011/12/02/powershell-function-remove-adphoto/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 13:00:31 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell Functions]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=474</guid>
		<description><![CDATA[Since we now have a function to add a photo to a User Account object in Active Directory and one to show the photo, anybody care to guess what the Remove-ADPhoto function does? If you didn&#8217;t answer something along the lines of &#8220;removes the photo from the User Account object in Active Directory&#8221;, you&#8217;re in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=474&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since we now have a function to add a photo to a User Account object in Active Directory and one to show the photo, anybody care to guess what the Remove-ADPhoto function does?</p>
<p>If you didn&#8217;t answer something along the lines of &#8220;removes the photo from the User Account object in Active Directory&#8221;, you&#8217;re in the wrong place.</p>
<pre>    ##--------------------------------------------------------------------------
    ##  FUNCTION.......:  Remove-ADPhoto
    ##  PURPOSE........:  Removes the picture stored in an Active Directory
    ##                    account.
    ##  REQUIREMENTS...:  PowerShell v2.0, Windows Server 2008 or newer Active
    ##                    Directory.
    ##  NOTES..........:
    ##--------------------------------------------------------------------------
    Function Remove-ADPhoto {
        &lt;#
        .SYNOPSIS
         Removes the picture stored in an Active Directory account.
        .DESCRIPTION
         Clears the thumbnailPhoto attribute of the specified user's Active
         directory account
        .PARAMETER UserName
         The User logon name for the account the picture will be removed from.
         Alias: -un

        .EXAMPLE
         C:\PS&gt;Remove-ADPhoto user1

         This example will clear the thumbnailPhoto attribute in Active
         Directory for the user account with the User logon name of "user1".

        .NOTES
         NAME......:  Remove-ADPhoto
         AUTHOR....:  Joe Glessner
         LAST EDIT.:  29NOV11
         CREATED...:  28NOV11
        .LINK

http://joeit.wordpress.com/

        #&gt;

        [CmdletBinding()]
            Param (
                [Parameter(Mandatory=$True,
                    #ValueFromPipeline=$True,
                    #ValueFromPipelineByPropertyName=$True,
                    Position=0)]
                [Alias('un')]
                [String]$UserName
            )#End: Param

        ##----------------------------------------------------------------------
        ##  Search AD for the user, set the path to the user account object.
        ##----------------------------------------------------------------------
        $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"")
        $Searcher.Filter = "(&amp;(ObjectClass=User)(SAMAccountName= $UserName))"
        $FoundUser = $Searcher.findOne()
        $P = $FoundUser | Select path
        Write-Verbose "Retrieving LDAP path for user $UserName ..."
        If ($FoundUser -ne $null) {
            Write-Verbose $P.Path
        }#END: If ($FoundUser -ne $null)
        Else {
            Write-Warning "User $UserName not found in this domain!"
            Write-Warning "Aborting..."
            Break;
        }#END: Else
        $User = [adsi]$P.path

        ##----------------------------------------------------------------------
        ##  Attach the picture to the AD account object (remove it if the
        ##  -remove switch is set).
        ##----------------------------------------------------------------------
        Write-Verbose "Removing photo from user account $UserName ..."
        $User.Properties["thumbnailPhoto"].Clear()
        #$User.Properties["jpegPhoto"].Clear()
        $User.CommitChanges()
        Write-Verbose "Attribute cleared!"
    }#END: Function Remove-ADPhoto</pre>
<p>&nbsp;</p>
<p><a href="http://joeit.files.wordpress.com/2008/11/end.jpg"><img class="aligncenter size-full wp-image-98" title="end" src="http://joeit.files.wordpress.com/2008/11/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/474/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/474/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/474/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=474&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/12/02/powershell-function-remove-adphoto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2008/11/end.jpg" medium="image">
			<media:title type="html">end</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Function: Show-ADPhoto</title>
		<link>http://joeit.wordpress.com/2011/12/01/powershell-function-show-adphoto/</link>
		<comments>http://joeit.wordpress.com/2011/12/01/powershell-function-show-adphoto/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 13:00:53 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell Functions]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=462</guid>
		<description><![CDATA[Now that we can add photos to User Account objects in Active Directory, we might also like to view them. Which is where the Show-ADPhoto function comes into play: ##-------------------------------------------------------------------------- ## FUNCTION.......: Show-ADPhoto ## PURPOSE........: Shows the photo stored in in an Active Directory User ## Account. ## REQUIREMENTS...: PowerShell v2.0, Windows Server 2008 or [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=462&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now that we can add photos to User Account objects in Active Directory, we might also like to view them. Which is where the Show-ADPhoto function comes into play:</p>
<pre>    ##--------------------------------------------------------------------------
    ##  FUNCTION.......:  Show-ADPhoto
    ##  PURPOSE........:  Shows the photo stored in in an Active Directory User
    ##                    Account.
    ##  REQUIREMENTS...:  PowerShell v2.0, Windows Server 2008 or newer Active
    ##                    Directory.
    ##  NOTES..........:
    ##--------------------------------------------------------------------------
    Function Show-ADPhoto {
        &lt;#
        .SYNOPSIS
         Shows the photo stored in in an Active Directory User Account.
        .DESCRIPTION
         Reads the ThumbnailPhoto attribute of the specified user's Active
         Directory account, and displays the returned photo in a form window.
        .PARAMETER UserName
         The User logon name of the Active Directory user to query.

        .EXAMPLE
         C:\PS&gt; Show-ADPhoto user1

         Displays the photo stored in the Active Directory user account with
         the User logon name of "user1".

        .NOTES
         NAME......: Show-ADPhoto
         AUTHOR....: Joe Glessner
         LAST EDIT.: 28NOV11
         CREATED...: 28NOV11
        .LINK

http://joeit.wordpress.com/

        #&gt;
        [CmdletBinding()]
            Param (
                [Parameter(Mandatory=$True,
                    #ValueFromPipeline=$True,
                    #ValueFromPipelineByPropertyName=$True,
                    Position=0)]
                [Alias('un')]
                [String]$UserName
            )#End: Param

        ##----------------------------------------------------------------------
        ##  Search AD for the user, set the path to the user account object.
        ##----------------------------------------------------------------------
        $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"")
        $Searcher.Filter = "(&amp;(ObjectClass=User)(SAMAccountName= $UserName))"
        $FoundUser = $Searcher.findOne()
        $P = $FoundUser | Select path
        Write-Verbose "Retrieving LDAP path for user $UserName ..."
        If ($FoundUser -ne $null) {
            Write-Verbose $P.Path
        }#END: If ($FoundUser -ne $null)
        Else {
            Write-Warning "User $UserName not found in this domain!"
            Write-Warning "Aborting..."
            Break;
        }#END: Else
        $User = [ADSI]$P.path

        ##----------------------------------------------------------------------
        ##  Build a form to display the image
        ##----------------------------------------------------------------------
        $Img = $User.Properties["thumbnailPhoto"].Value
        #$Img = $User.Properties["jpegPhoto"].Value
        [VOID][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
        $Form = New-Object Windows.Forms.Form
        $Form.Text = "Image stored in AD for $UserName"
        $Form.AutoSize = "True"
        $Form.AutoSizeMode = "GrowAndShrink"
        $PictureBox = New-Object Windows.Forms.PictureBox
        $PictureBox.SizeMode = "AutoSize"
        $PictureBox.Image = $Img
        $Form.Controls.Add($PictureBox)
        $Form.Add_Shown({$Form.Activate()})
        $Form.ShowDialog()
    }#END: Function Show-ADPhoto</pre>
<p>&nbsp;</p>
<p><a href="http://joeit.files.wordpress.com/2008/11/end.jpg"><img class="aligncenter size-full wp-image-98" title="end" src="http://joeit.files.wordpress.com/2008/11/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/462/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=462&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/12/01/powershell-function-show-adphoto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2008/11/end.jpg" medium="image">
			<media:title type="html">end</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Functions: Add-ADPhoto</title>
		<link>http://joeit.wordpress.com/2011/11/30/powershell-functions-add-adphoto/</link>
		<comments>http://joeit.wordpress.com/2011/11/30/powershell-functions-add-adphoto/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 13:00:06 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell Functions]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=451</guid>
		<description><![CDATA[Recently I had a colleague ask me how to get Outlook to display a picture for people outside the company, since everyone in the company had a picture in Outlook. Well, that was a pretty good question, as I wasn&#8217;t quite sure why everyone in the company had pictures to begin with. As it turns [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=451&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I had a colleague ask me how to get Outlook to display a picture for people outside the company, since everyone in the company had a picture in Outlook.</p>
<p>Well, that was a pretty good question, as I wasn&#8217;t quite sure why everyone in the company had pictures to begin with. As it turns out, I did it unintentionally.</p>
<p><a title="Spiceworks.com" href="http://www.spiceworks.com/referrer/Thereal_Joe" target="_blank">Spiceworks</a> (I think it was v5) introduced &#8220;People View&#8221; where you can have pictures for your users. Since I already had Spiceworks pulling user information from Active Directory, I just stored the pictures in the Active Directory User Account object (I used the thumbnailPhoto attribute which is what this function uses, though there is code in there for using the jpegPhoto attribute too if you prefer). I&#8217;m lazy like that.</p>
<p>The AD Schema was extended to facilitate this with Server 2008, so if you have a Server 2008 domain controller, or have extended your AD Schema in preparation for moving to Server 2008, you can now store pictures in AD User Account objects. Aaaaand shenanigans ensue in 3&#8230; 2&#8230; 1&#8230;</p>
<p>Well time moves on, and when I upgraded all my users to Office 2010, voila pictures in Outlook!</p>
<p>One of the things that came out of that whole fiasco was some (really hacked together and sloppy) PowerShell code that I used to get the pictures into Active Directory.</p>
<p>For whatever reason, I recently started going through my <del>stack</del> <del>pile</del> <del>heap</del> <del>mountain</del> <del>dear god what <strong><em>is</em></strong> all this</del> collection of PowerShell code and creating Functions out of anything that I might need to use again.</p>
<p>Thus I give you Add-ADPhoto:</p>
<pre>    ##--------------------------------------------------------------------------
    ## FUNCTION.......: Add-ADPhoto
    ## PURPOSE........: Stores a picture in an Active Directory account.
    ## REQUIREMENTS...: PowerShell v2.0, Windows Server 2008 or newer Active
    ## Directory.
    ## NOTES..........:
    ##--------------------------------------------------------------------------
    Function Add-ADPhoto {
        &lt;#
        .SYNOPSIS
         Stores a picture in an Active Directory account.
        .DESCRIPTION
         Starting with Server 2008, Microsoft has added the ability to store
         pictures in Active Directory User Accounts. To do this
         programmatically, the picture must be converted to a Byte Array, which
         this script will do for you.
         Pictures stored in Active Directory User Accounts are limited to 100KB
         in size, as defined in the AD Schema. If you are going to use this
         primarily for displaying photos in Outlook, you'll want to size the
         photos to 96x96 pixels first, as this is the exact dimentions of the
         GAL photo box in Outlook.
        .PARAMETER UserName
         The User logon name for the account the picture will be stored in.
         Alias: -un
        .PARAMETER File
         The full path and file name of the picture to be stored in the user
         account.
         Alias: -f
        .EXAMPLE
         C:\PS&gt;Add-ADPhoto user1 c:\pic.jpg

         This example will set the jpegPhoto attribute in Active Directory for
         the user account with the User logon name of "user1" to the file
         "c:\pic.jpg".

        .NOTES
         NAME......: Add-ADPhoto
         AUTHOR....: Joe Glessner
         LAST EDIT.: 29NOV11
         CREATED...: 28NOV11
        .LINK

http://joeit.wordpress.com/

        #&gt;

        [CmdletBinding()]
        Param (
            [Parameter(Mandatory=$True,
                #ValueFromPipeline=$True,
                #ValueFromPipelineByPropertyName=$True,
                Position=0)]
            [Alias('un')]
            [String]$UserName,
            [Parameter(Mandatory=$True,
                #ValueFromPipeline=$True,
                #ValueFromPipelineByPropertyName=$True,
                Position=1)]
            [Alias('f')]
            [String]$File
        )#End: Param

        ##----------------------------------------------------------------------
        ## Search AD for the user, set the path to the user account object.
        ##----------------------------------------------------------------------
        $Searcher = New-Object DirectoryServices.DirectorySearcher([ADSI]"")
        $Searcher.Filter = "(&amp;(ObjectClass=User)(SAMAccountName= $UserName))"
        $FoundUser = $Searcher.findOne()
        $P = $FoundUser | Select path
        Write-Verbose "Retrieving LDAP path for user $UserName ..."
        If ($FoundUser -ne $null) {
            Write-Verbose $P.Path
        }#END: If ($FoundUser -ne $null)
        Else {
            Write-Warning "User $UserName not found in this domain!"
            Write-Warning "Aborting..."
            Break;
        }#END: Else
        $User = [adsi]$P.path
        ##----------------------------------------------------------------------
        ## Attach the picture to the AD account object.
        ##----------------------------------------------------------------------
        Write-Verbose "Byte Encoding jpg file..."
        If ($File -ne $null) {
            [Byte[]]$jpg = Get-Content $File -encoding byte
            Write-Verbose "Clearing thumbnailPhoto attribute for $UserName"
            $User.Properties["thumbnailPhoto"].Clear()
            #Write-Verbose "Clearing jpegPhoto attribute for $UserName ..."
            #$User.Properties["jpegPhoto"].Clear()
            Write-Verbose "Setting photo for $UserName to $File ..."
            $User.Properties["thumbnailPhoto"].Value = $jpg
            #$User.Properties["jpegPhoto"].Value = $jpg
            $User.SetInfo()
            Write-Verbose "Attribute set!"
        }#END: If ($File -ne $null)
        Else {
            Write-Warning "$File does not exist!"
            Write-Warning "Aborting..."
            Break;
        }#END: Else
    }#END: Function Add-ADPhoto</pre>
<p>There are two companion functions for this, Show-ADPhoto, and Remove-ADPhoto, which will be posted separately in the very near future.</p>
<p>&nbsp;</p>
<p><a href="http://joeit.files.wordpress.com/2008/11/end.jpg"><img class="aligncenter size-full wp-image-98" title="end" src="http://joeit.files.wordpress.com/2008/11/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/451/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/451/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/451/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=451&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/11/30/powershell-functions-add-adphoto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2008/11/end.jpg" medium="image">
			<media:title type="html">end</media:title>
		</media:content>
	</item>
		<item>
		<title>Siri-ous vulnerability in default iPhone 4s configuration</title>
		<link>http://joeit.wordpress.com/2011/10/26/siri-ous-vulnerability-in-default-iphone-4s-configuration/</link>
		<comments>http://joeit.wordpress.com/2011/10/26/siri-ous-vulnerability-in-default-iphone-4s-configuration/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 03:01:07 +0000</pubDate>
		<dc:creator>Joe G.</dc:creator>
				<category><![CDATA[Ask an IT ninja!!!]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[IT Security News]]></category>

		<guid isPermaLink="false">https://joeit.wordpress.com/2011/10/26/siri-ous-vulnerability-in-default-iphone-4s-configuration/</guid>
		<description><![CDATA[So like many people, I got an iPhone 4s shortly after launch. It wasn&#8217;t totally gadget lust, I have iPhone users to support at work, and they have started upgrading to the 4s (deployed the first one today). Turns out it&#8217;s a good thing I got one a couple of weeks before any of my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=448&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So like many people, I got an iPhone 4s shortly after launch. It wasn&#8217;t totally gadget lust, I have iPhone users to support at work, and they have started upgrading to the 4s (deployed the first one today).</p>
<p>Turns out it&#8217;s a good thing I got one a couple of weeks before any of my users. </p>
<p>I keep my phone locked with a passcode, but with Siri enabled, that doesn&#8217;t mean the phone is secure. </p>
<p>There is a setting in iOS 5 phones with Siri enabled (at this point only the 4s) that allows Siri to be accessed while the phone is locked. This is a feature <em>not</em> a bug. With this feature enabled anyone who picks up your locked iPhone 4s can send email, text messages, make calls, even screw with your calendar. The potential for shenanigans is only limited by how well the unauthorized user knows Siri. </p>
<p>I was able to set an alarm for 3AM with the phone locked, so I can only imagine what someone that <em>really</em> knows how to use Siri could get up to. </p>
<p>Unfortunately Apple decided to set this to <strong><em>enabled by default</em></strong>. Apparently impressing your buddies is more important than securing your phone, even if you <em>thought</em> you had secured your phone by enabling a passcode lock.</p>
<p>Fortunately it&#8217;s a setting, so you can disable it. To do so, go to <strong>Settings&gt;General&gt;Passcode Lock</strong>, and turn the Siri setting to <strong>Off</strong>. </p>
<p>This means that you can&#8217;t use Siri when your phone is locked, but then neither can anyone else. I&#8217;m disappointed that Apple hasn&#8217;t yet made taking security seriously a priority, it would have been so easy to avoid this potentially serious security breach.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/448/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/448/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/448/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/448/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/448/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/448/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/448/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/448/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=448&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/10/26/siri-ous-vulnerability-in-default-iphone-4s-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9d184d6baa02e7fdba58b4e5cd7aed82?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">jglessner</media:title>
		</media:content>
	</item>
		<item>
		<title>How to make use of your PowerShell profile.</title>
		<link>http://joeit.wordpress.com/2011/08/12/how-to-make-use-of-your-powershell-profile/</link>
		<comments>http://joeit.wordpress.com/2011/08/12/how-to-make-use-of-your-powershell-profile/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 13:00:19 +0000</pubDate>
		<dc:creator>Joe G.</dc:creator>
				<category><![CDATA[Ask an IT ninja!!!]]></category>
		<category><![CDATA[Kung Fu for SysAdmins]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=442</guid>
		<description><![CDATA[PowerShell is the tool for Windows Administrators. I can&#8217;t even begin to explain how truly useful it is in this article. Once of the most awesome features of PowerShell is it&#8217;s native extensibility. It is rather trivial to do things in PowerShell that would take monumental amounts of effort using any other Windows automation technology [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=442&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>PowerShell is the tool for Windows Administrators. I can&#8217;t even begin to explain how truly useful it is in this article. Once of the most awesome features of PowerShell is it&#8217;s native extensibility. It is rather trivial to do things in PowerShell that would take monumental amounts of effort using any other Windows automation technology (I&#8217;m looking at you VBScript), if it is even possible to do them with said technology (again, I&#8217;m looking at you VBScript).</p>
<p>Before you can make use of a profile in PowerShell, you must enable the execution of scripts (this is disabled in PowerShell by default), by setting the Execution Policy to at least &#8220;AllSigned&#8221; (be aware that if you do this, you&#8217;ll have to be able to digitally sign your scripts before any will execute, including your profile script). You can find information on setting the PowerShell Execution Policy <a title="technet.microsoft.com" href="http://technet.microsoft.com/en-us/library/dd347628.aspx" target="_blank">here</a>.Once you have the Execution Policy set (I generally use RemoteSigned, but in a production environment, you should really be using AllSigned for maximum security), you need to set up your profile script.</p>
<p>PowerShell can store all kinds of useful things in the $profile variable (like aliases, functions, variables, or even extensions like snap-ins or modules), which is actually a PowerShell script that is executed when a console session is started (hence why you need to set the Execution Policy before you can make use of it). But the PowerShell Profile is not created automatically. To see if you have a PowerShell profile, open a PowerShell session, and type this command:</p>
<pre>    test-path $profile</pre>
<p>If it returned $true, you already have a PowerShell profile set up, if it returned $false, you do not (If you do skip to the &#8220;Editing your $profile&#8221; section below).</p>
<h1>Creating a PowerShell Profile</h1>
<p>If you do not already have a PowerShell Profile the first step is to create one. This can be easily done right from the PowerShell console. To create a profile script, type the following at the PowerShell console prompt:</p>
<pre>    new-item -path $profile -itemtype file -force</pre>
<p>This will generate the required file, and let PowerShell know that you are ready to use it.</p>
<h1>Editing your $profile</h1>
<p>Just having a PowerShell profile does nothing to change the way PowerShell behaves. To really make use of a PowerShell profile, you&#8217;ll need to add something to alter PowerShell&#8217;s default behavior. To edit the PowerShell profile type the following command at the PowerShell console:</p>
<pre>    notepad $profile</pre>
<p>This will open your $profile script for editing in NotePad. Ok, so now what do we put in there?</p>
<p>Really this is going to be personal preference. There are literally thousands of things you can put in a PowerShell profile script. For purposes of demonstration, we&#8217;ll set an alias. In the NotePad window that opened when we ran that last command, add this line:</p>
<pre>    Set-Alias open 'explorer'</pre>
<p>This creates an alias for Windows Explorer. Now save the file, and run this command at the PowerShell console:</p>
<pre>    . $profile</pre>
<p>This will reload your profile script (make sure there is a space between the &#8220;.&#8221; and &#8220;$profile&#8221;), and we can now make use of the alias. At the PowerShell console type the following:</p>
<pre>    open c:\</pre>
<p>If your $profile is working correctly, this should have opened the root of your C:\ drive in Windows Explorer. Now you can do the same thing without the $profile script directly in the console, but using the PowerShell Profile allows things you set there to persist between console sessions (you can test this by closing the PowerShell console and reopening it, the alias we just set should still work).</p>
<p><a href="http://joeit.files.wordpress.com/2008/11/end.jpg"><img class="aligncenter size-full wp-image-98" title="end" src="http://joeit.files.wordpress.com/2008/11/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/442/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/442/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/442/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=442&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/08/12/how-to-make-use-of-your-powershell-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9d184d6baa02e7fdba58b4e5cd7aed82?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">jglessner</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2008/11/end.jpg" medium="image">
			<media:title type="html">end</media:title>
		</media:content>
	</item>
		<item>
		<title>How do I?: Share a printer from WS2008 R2 to x86 clients (or, All printers should die in a fire.)</title>
		<link>http://joeit.wordpress.com/2011/06/08/how-do-i-share-a-printer-from-ws2008-r2-to-x86-clients-or-all-printers-should-die-in-a-fire/</link>
		<comments>http://joeit.wordpress.com/2011/06/08/how-do-i-share-a-printer-from-ws2008-r2-to-x86-clients-or-all-printers-should-die-in-a-fire/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 13:00:59 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[Ask an IT ninja!!!]]></category>
		<category><![CDATA[How do I?]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=428</guid>
		<description><![CDATA[Of all the scenes in Office Space, this is probably the most iconic for IT professionals. We have all dealt with printers, and we all hate them. We&#8217;ve all wanted to do this at some point, and it seems that no matter how far technology advances, printers never fail to provide an IT professional the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=428&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://joeit.files.wordpress.com/2011/06/officespace-resized-600-jpg.png"><img class="alignleft size-full wp-image-429" title="OfficeSpace-resized-600.jpg" src="http://joeit.files.wordpress.com/2011/06/officespace-resized-600-jpg.png?w=600" alt=""   /></a>Of all the scenes in Office Space, this is probably the most iconic for IT professionals. We have all dealt with printers, and we all hate them. We&#8217;ve all wanted to do this at some point, and it seems that no matter how far technology advances, printers never fail to provide an IT professional the opportunity to hate them anew.</p>
<p>At my day job we recently replaced two aging plotters (a plotter is just a really big printer), with the &#8220;new hotness&#8221; plotter: the Xerox 6279. It looks nice, it&#8217;s got lots of features, but underneath it all, it&#8217;s still just an overgrown printer.</p>
<p>The CAD group made the decision on which plotter to buy, I only had two requirements:</p>
<ul>
<li>It must support Windows Server 2008 R2.</li>
<li>It must be a new model (no &#8220;discontinued model&#8221; specials).</li>
</ul>
<p>I really only care about the first requirement, but I don&#8217;t want to have the thing be obsolete (read ludicrously expensive to repair) in six months. So the Xerox rep assures our CAD group that the plotter is WS2008R2 compatible, and they buy it.</p>
<p>What he meant to say is that it is engineered for WS2008, but will work on WS2008R2. Since the CAD group are all on Windows 7 x64 machines, no problem getting them up and working with the new plotter. Unfortunately a couple of our Project Managers need access to the new plotter as well, and this is where things start to go awry. See our Project Managers are on Windows 7 x86 machines. And since Xerox did not write drivers for WS2008R2 (they were written for WS2008, and they even have an x64 driver), the driver does not support this correctly.</p>
<p>But I don&#8217;t blame Xerox for this (well not totally), I also blame Microsoft. See this should be a fairly simple operation, which goes something like this:</p>
<ul>
<li>On the Print Server, open <strong>Start</strong> &gt; <strong>Administrative Tools</strong> &gt; <strong>Print Management</strong></li>
<li>Right click the Shared printer</li>
<li>Select the <strong>Sharing</strong> Tab</li>
<li>Click the <strong>Additional Drivers&#8230;</strong> button</li>
<li>Check the <strong>x86</strong> checkbox</li>
<li>Click the <strong>OK</strong> button</li>
</ul>
<p>Windows will prompt you for the location of the driver, you select it, and you&#8217;re off to the races.</p>
<p>Not so much if you are doing this on Server 2008R2, using a driver that was not written specifically for Server 2008R2. After you point the wizard at the correct driver it asks you for ntprint.inf, but you won&#8217;t find it on WS2008R2.</p>
<p>Why? Because Windows needs the x86 version of the ntprint.inf file. And it doesn&#8217;t exist on Server 2008R2 (this is where I blame Microsoft).</p>
<p>Really Microsoft? Is it so hard to include a tiny (10KB) INF file somewhere in the OS?</p>
<p>So what&#8217;s the solution? Well Microsoft&#8217;s official solution is to do one of two things:</p>
<ul>
<li>Install the printer driver locally on one client (which should allow the print server to upload the correct driver automatically)</li>
<li>Copy the ntprint.inf file from a 32 bit version of WS2008 (because everyone has one on their network amiright?) to the WS2008R2 print server.</li>
</ul>
<p>The first option will work, but it&#8217;s not as straight forward as Microsoft would have you believe. Most of the time it doesn&#8217;t work automatically, and you have to export the driver, and then import it on the print server (which works approximately 50% of the time). Most frequently, you end up having to install the printer driver on each x86 client, because it just seems faster (if you only have one or two x86 clients, it may be initially faster to do it this way, but otherwise, or over time it&#8217;s not).</p>
<p>The second option is the Least Amount Of Administrative Effort, but what if you don&#8217;t have a 32 bit WS2008 install? You can also use  WS2003 (if you have one of those in 32 bit).</p>
<p>If you don&#8217;t have either, you can use method one, or you can install the WS2008 32 bit version trial in a VM. Seriously, this is the easiest way. I know this seems like it will take longer than installing the printer driver on the client machines, but remember you only have to do this once (as long as you keep the files we&#8217;re going to copy out of the OS) and then you use these files for any printer you&#8217;ll share from WS2008R2 with x86 clients.</p>
<p>Once you have a WS2008 x86 instance, navigate to C:\Windows\System32\DriverStore\FileRepository, and find a folder labeled &#8220;ntprint.inf_x86_neutral_xxxxxxxx&#8221; (the last string will be a random hex string). There may be more than one. Copy them all to a network share, or somewhere on the WS2008R2 machine.</p>
<p>When the WS2008R2 Print Management Additional Driver wizard asks you for the ntprint.inf file, point it to one of these folders, and it should find it in one of them.</p>
<p>You can now successfully install the network printer on x86 clients.</p>
<p>Or you could just get a bat and some friends to help you fix all your printer problems. <em><strong>Permanently</strong></em>.</p>
<p style="text-align:center;"><a href="http://joeit.files.wordpress.com/2010/04/end.jpg"><img class="size-full wp-image-254 aligncenter" title="end.jpg" src="http://joeit.files.wordpress.com/2010/04/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/428/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/428/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/428/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=428&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/06/08/how-do-i-share-a-printer-from-ws2008-r2-to-x86-clients-or-all-printers-should-die-in-a-fire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/06/officespace-resized-600-jpg.png" medium="image">
			<media:title type="html">OfficeSpace-resized-600.jpg</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2010/04/end.jpg" medium="image">
			<media:title type="html">end.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Kung Fu for SysAdmins: Using Version Control Systems for scripts</title>
		<link>http://joeit.wordpress.com/2011/05/24/kung-fu-for-sysadmins-using-version-control-systems-for-scripts/</link>
		<comments>http://joeit.wordpress.com/2011/05/24/kung-fu-for-sysadmins-using-version-control-systems-for-scripts/#comments</comments>
		<pubDate>Tue, 24 May 2011 13:00:26 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[How do I?]]></category>
		<category><![CDATA[Kung Fu for SysAdmins]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VBScript]]></category>
		<category><![CDATA[WWJD (What Would Joe Do?)]]></category>

		<guid isPermaLink="false">https://joeit.wordpress.com/?p=400</guid>
		<description><![CDATA[Like nearly every administrator I know, I have a few scripts that I use to help me do my job easier and faster. Well ok, more than a few. Alright, alright, I have more scripts than most people have hair. I have scripts that were written for an NT4 Alpha Cluster. I never get rid [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=400&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://joeit.files.wordpress.com/2010/04/kung-fu.jpg"><img class="alignleft size-full wp-image-263" title="Kung fu" src="http://joeit.files.wordpress.com/2010/04/kung-fu.jpg?w=600" alt=""   /></a></p>
<p>Like nearly every administrator I know, I have a few scripts that I use to help me do my job easier and faster. Well ok, more than a few. Alright, alright, I have more scripts than most people have hair.</p>
<p>I have scripts that were written for an NT4 Alpha Cluster. I never get rid of them. I’ve lost more scripts than most people will ever have. I’ve forgotten more about most scripting languages than most people will ever know.</p>
<p>I find that the challenge is keeping track of them. If I could turn my computers, network storage, USB drives, and email upside down and shake them, enough scripts would fall out to fill the library of congress. Damned if I know where they’re all stored, but I know I have them.</p>
<p>Unfortunately, most of them are variants on the same script, or actually are the same script. Many times if I can’t find the exact script I am looking for, I’ll slap one together, do some quick testing, give it a unique name (you know something that makes it easy to know what it does, like &#8220;test74.vbs&#8221;), use it once or twice, and then forget what it was for.</p>
<p>Yes I’ll admit it, I have a problem. If there were an AA for scripters, I’d probably be the president of the local chapter.</p>
<p>Or at least I would have been before I started using Version Control software. About a month ago I was editing a script that I was having troubles with, accidentally overwrote something that broke it, and closed the editor. Not a big deal on small scripts, but this one was at about 1500 lines. It took me HOURS to figure out exactly where the code was that I’d overwritten, but I never did figure out exactly what I did that broke it (though I did get it working well enough to do what I needed it to do).</p>
<p>I’ve known about Version Control software for years (I worked at a software company once upon a time), I’ve even used Subversion before. I’d been meaning to set it up for myself for years, and this incident was the catalyst I needed to actually do it.</p>
<p>Keeping the <a title="joeit.wordpress.com" href="http://joeit.wordpress.com/2008/11/05/the-laoae-principle/" target="_blank">LAOAE principle</a> in mind, I wanted my repository to be available to me in all the places that I’d be likely to be working on a script, mostly at work and at home.</p>
<p>But I already have enough servers to admin, and I don’t really want to have to care for and update yet another thing on my work network, so I started looking for hosted subversion offerings. I’m not a software company, so I had to weed out the ones that wanted absurd monthly fees (and offered absurd feature sets). I just wanted hosted Subversion, I didn’t need team collaboration, or project management features. I thought about going Open Source with it (like github, or Google code) but decided that since I would be using it to also host code that belongs to my employer, it would probably be better to go with a commercial solution.</p>
<p>Did I mention that I didn’t really want to spend any money on this? Yeah, free is king in the land of the Sysadmin. There were several services that fit the bill, in the end I decided to use <a title="projectlocker.com" href="http://projectlocker.com/" target="_blank">ProjectLocker</a>. Their free offering gives you three users and 300MB of storage (even for my bloated script collection this is plenty) three Repositories, and three Projects (each project can have an unlimited number of files and folders), though for only $19/month you can move up to 15 users and 10GB of storage (full details of their offerings can be <a title="projectlocker.com" href="https://projectlocker.com/scenario/startup" target="_blank">found here</a>).</p>
<p>Oh and all of their plans offer both Git and Subversion, so whichever you are more comfortable with is available. I have used subversion in the past, so that&#8217;s what I chose to go with.</p>
<p>Now before I get any further in this post, I am going to write this with the assumption that you have at least a conceptual knowledge of how Version Control Systems (VCS) work. If you don&#8217;t and would like to, <a title="red-bean.com" href="http://svnbook.red-bean.com/" target="_blank">this free ebook</a> is a <strong>great</strong> place to start (and really relevant, as it&#8217;s also the official documentation for Subversion).</p>
<h1>Setting up a VCS for use with scripts</h1>
<h2>ProjectLocker (Subversion)</h2>
<p>Initial setup of a ProjectLocker account is quick and easy:</p>
<ol>
<li>Select your Service Level (Free is fine for me).</li>
<li>Select you term (Free is Always Free).</li>
<li>Enter a promotional code (optional).</li>
<li>Enter a Referral Source email address (if you have one, the referrer gets free storage space in small increments).</li>
<li>Click &#8220;Next Step&#8221;.</li>
<li>Agree to the Terms of Service (if you do), and select the &#8220;I am ready to setup my account&#8221; button.</li>
<li>The information on this page is pretty self explanatory, click the &#8220;Place My Order&#8221; button at the bottom when done</li>
</ol>
<p><strong>Save the Login URL on the resulting page!</strong> This is the URL you will use to access your repository (https://portal.projectlocker.com).</p>
<p>Log in to your repository and fill out the requested information (it helps keep the free offering available).</p>
<p>That&#8217;s pretty much it on the Subversion side, though you can set up users and additional projects if you like. Since I am using this to host my personal code, as well as code that belongs to my employer, I set up two projects: Personal_code and Work_code (I know, original right?).</p>
<p>Once you have a repository running, ProjectLocker will give you a URL to the repository, it&#8217;ll look something like this: <strong>https://pl3.projectlocker.com/TestCompany77/Personal_code/svn</strong></p>
<p><em><strong>This is what you&#8217;ll need to access the repository from a client, so write this down (bookmark it, whatever you have to do, you will need this)!</strong></em> (obviously use the one in your account, the one listed above won&#8217;t work for you)</p>
<p>I also set up a user account for the main IT email account at the office so that it has access to the Work project only. This way when or if I leave my current job, I can just hand off the login to the next person (or leave it with someone here) and they will be able to log in and access all of the scripts that are owned by the company, including being able to see all the changes I&#8217;ve made, and any comments I&#8217;ve made during the commit process.</p>
<h2>TortiseSVN (subversion client)</h2>
<p>So now that we have a repository, we need a subversion client. On Windows that leads us to <a title="tortisesvn.net" href="http://tortoisesvn.net/" target="_blank">TortiseSVN</a>. There are others, and you are certainly welcome to use a different subversion client,  but TortiseSVN is the hands down leader of the pack for features and maturity. It&#8217;s also really easy to install and configure.</p>
<p>TortiseSVN is a command line interface to subversion, but it integrates with the Windows Shell. This means that there is no &#8220;program&#8221; window to access for settings and such, you access everything via context menus (right click).</p>
<p>Once you have it installed on a Windows computer, you&#8217;ll need to link it to your Repository. The easiest way I&#8217;ve found to do this is to use the TortiseSVN Repo-browser (you&#8217;ll want to get familiar with this tool anyway, as it is installed with TortiseSVN by default and you can use it to&#8230; well browse your repository).</p>
<p>Just right click on any file or folder, highlight the <strong>TortiseSVN</strong> entry, and select <strong>Repo-browser</strong> from the resulting menu:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/repo-browser.png"><img class="aligncenter size-full wp-image-403" title="repo-browser" src="http://joeit.files.wordpress.com/2011/05/repo-browser.png?w=600&#038;h=399" alt="TortiseSVN context menu" width="600" height="399" /></a></p>
<p>In the Repo-browser window enter the URL for your subversion repository and click the <strong>OK</strong> button:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/repo-browser1.png"><img class="aligncenter size-full wp-image-404" title="repo-browser1" src="http://joeit.files.wordpress.com/2011/05/repo-browser1.png?w=600" alt=""   /></a></p>
<p>When the Repo-browser attempts to connect to your repository, it will ask you for a username and password, and if you want to store that credential in a file on your computer (that&#8217;s up to you):</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/repo-browser2.png"><img class="aligncenter size-full wp-image-405" title="repo-browser2" src="http://joeit.files.wordpress.com/2011/05/repo-browser2.png?w=600" alt=""   /></a></p>
<p>Once you have entered the credentials, it will show you the contents of your repository:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/repo-browser3.png"><img class="aligncenter size-full wp-image-406" title="repo-browser3" src="http://joeit.files.wordpress.com/2011/05/repo-browser3.png?w=600&#038;h=461" alt="" width="600" height="461" /></a></p>
<p>Now TortiseSVN is ready to use! The Repo-browser interface is fully drag and drop, so you can just drop your script files and folders on the right pane, and it will upload them to subversion. You&#8217;ll need to enter a commit message, and once the upload completes, you have your first version of your files in subversion.</p>
<h2>NotePad++ (text editor)</h2>
<p>Now all we need is an editor that can make use of this, and we&#8217;re in luck. <a title="joeit.wordpress.com" href="http://joeit.wordpress.com/2008/08/18/admins-arsenal-notepad/" target="_blank">Perennial favorite NotePad++</a> has an extension for TortiseSVN. First, you&#8217;ll need to install NotePad++ (or open up the portable version on your USB drive). Once you have NotePad++ open, Select the <strong>Plugin Manager</strong> from the <strong>Plugins</strong> menu as shown here:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr.png"><img class="aligncenter size-full wp-image-410" title="npp_plugin_mgr" src="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr.png?w=600" alt=""   /></a></p>
<p>One of the reasons that I&#8217;ve been such a big fan of NotePad++ is it&#8217;s extensive selection of available plugins. In the Plugin Manager, just select the <strong>Tortise SVN</strong> plugin and click <strong>Install</strong> as shown in the image below.</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr1.png"><img class="aligncenter size-full wp-image-412" title="npp_plugin_mgr1" src="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr1.png?w=600&#038;h=410" alt="" width="600" height="410" /></a></p>
<p>This plugin requires two supporting plugins, which will automatically be selected for install, as shown here:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr2.png"><img class="aligncenter size-full wp-image-413" title="npp_plugin_mgr2" src="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr2.png?w=600" alt=""   /></a></p>
<p>Once the installation is complete, NotePad++ will need to be restarted (it will tell you this and prompt you for the restart of the program). After NotePad++ is restarted, we are ready to start actually using our version control system!</p>
<p>If you&#8217;ve never used a VCS before, you&#8217;ll need to understand the concept of <strong>Working Sets</strong> and the <strong>Checkin</strong>/<strong>Checkout</strong> relationship. These topics are <em><strong>far</strong></em> outside the scope of this post, but if you are new to this, I&#8217;d really suggest reading the official Subversion documentation (or at least skimming it). You can find the <a title="red-bean.com" href="http://svnbook.red-bean.com/" target="_blank">official Subversion book here</a>.</p>
<p>In order to work on any files stored in the repository, we first need to create a local copy of the repository, or a &#8220;Working Set&#8221;:</p>
<ol>
<li>Create a folder where you want to store your Working Set. You can name it anything but &#8220;svn&#8221;, as this name is reserved for use by TortiseSVN. I usually choose something like C:\SOURCE, so it&#8217;s easy to remember.</li>
<li>Right click on the folder you just created and choose <strong>SVN Checkout</strong> from the context menu.</li>
</ol>
<p>At this point, TortiseSVN is going to prompt you for some information about how you want the Working Set created, in the form of this window:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/workingset.png"><img class="aligncenter size-full wp-image-414" title="workingSet" src="http://joeit.files.wordpress.com/2011/05/workingset.png?w=600" alt=""   /></a></p>
<p>The only thing you really need to be concerned with here is the <strong>Revision</strong> section. You only want to change this if you don&#8217;t want the latest revision of the files in your repository (which is what HEAD revision means). If you need an earlier revision, select the <strong>Revision</strong> radio button, and then use the <strong>Show Log</strong> button at the right to search for the desired revision. If this is the first time you&#8217;ve set this up, or you want the latest revision, just click the <strong>OK</strong> button. After all the files from your repository are copied, you&#8217;re ready to start editing!</p>
<p>Up to this point, everything we&#8217;ve discussed has been pure configuration, something that you&#8217;ll do one time per computer, and that&#8217;s it.</p>
<h2>Using the Version Control System</h2>
<p>Here is an example of the typical workflow of editing a script without using a VCS:</p>
<ol>
<li>Find the script (this is usually the hardest part).</li>
<li>Edit the script.</li>
<li>Save the file.</li>
<li>Pull your hair out because the 2500+ line script you just changed isn&#8217;t working right (hopefully you&#8217;ve never experienced this step).</li>
</ol>
<p>Now here is an example of the typical workflow of editing a script using the VCS we just set up:</p>
<ol>
<li>Open the file you want to edit from the Working Set in NotePad++. For this example I&#8217;ll use the file C:\Admin\Scripts\SOURCE\Shell\reboot.cmd from my local Working Set.</li>
<li>Make your changes in NotePad++, and <strong>save the file</strong>. If you do not save the file, there is nothing to commit to the repository.</li>
<li>From the NotePad++ <strong>Plugins</strong> menu, select <strong>Tortise SVN</strong> &gt; <strong>TSVN &#8211; File commit</strong>, as shown in this image:</li>
</ol>
<p><a href="http://joeit.files.wordpress.com/2011/05/npp_commit.png"><img class="aligncenter size-full wp-image-415" title="npp_commit" src="http://joeit.files.wordpress.com/2011/05/npp_commit.png?w=600&#038;h=425" alt="" width="600" height="425" /></a></p>
<p>This tells TortiseSVN that you want to write the changes you&#8217;ve made to your repository, and it will prompt you to do so using the Commit window:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/npp_commit1.png"><img class="aligncenter size-full wp-image-416" title="npp_commit1" src="http://joeit.files.wordpress.com/2011/05/npp_commit1.png?w=600" alt=""   /></a></p>
<p>As you can see there are several options before you actually commit the file. In practice you&#8217;ll usually only need the <strong>Message</strong> area and the <strong>OK</strong> button. The <strong>Message</strong> area is basically a comment area for what these changes represent. The more verbose you are here, the easier it will be to understand the changes that were made in the revision, and it will also make it much easier to find a revision where a particular change was made. Once you click the <strong>OK</strong> button, TortiseSVN will commit your changes to the repository, as shown in this window:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/npp_commit2.png"><img class="aligncenter size-full wp-image-417" title="npp_commit2" src="http://joeit.files.wordpress.com/2011/05/npp_commit2.png?w=600&#038;h=275" alt="" width="600" height="275" /></a></p>
<p>Clearly you can see this is a slightly more complicated process, but the pay off totally worth it if something goes wrong.</p>
<h2>How to figure out where you broke something after you&#8217;ve been using this for a while</h2>
<p>The exact workflow that any given person uses will probably be slightly different than that used by any other person, so this is going to be a description of my particular workflow, and how I track things.</p>
<p>I&#8217;m writing a PowerShell Module (sshhh), and I have a function in it called Get-Sysinternals. When I first wrote this function, it would default to downloading all of the Sysinternals utilities. I&#8217;ve edited it and altered it several times since then, and I wanted the default behavior to be that it would only download updates to the tools if they were already installed on the local computer in a specific folder. I then later added some switches to change the default behavior, and somewhere along the line, I broke the default behavior.</p>
<p>To figure out what changed, I needed to see what the code looked like when the default behavior was changed. To do this I opened the file (AdminsArsenal.psm1) in NotePad++, and from the NotePad++ <strong>Plugins</strong> menu, I selected <strong>Tortise SVN</strong> &gt; <strong>TSVN &#8211; File log</strong>.</p>
<p>This brings up a viewer for all of the Commit activity for the file, which looks something like this:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/revlog1.png"><img class="aligncenter size-full wp-image-418" title="revLog1" src="http://joeit.files.wordpress.com/2011/05/revlog1.png?w=600&#038;h=639" alt="" width="600" height="639" /></a></p>
<p>Scrolling through the commit messages, I find that at revision 76 I changed the default behavior.</p>
<p>What you&#8217;ll do at this point depends on how you want to handle this. You could <strong>right click</strong> the file in explorer, and select <strong>TortiseSVN</strong> &gt; <strong>Update to revision&#8230;</strong>, if you just wanted to revert the file to a point where you know it worked. Personally I just wanted to see the code in revision 76, so I right clicked the revision I had highlighted, and selected <strong>Compare with working copy</strong> from the resulting context menu:</p>
<p><a href="http://joeit.files.wordpress.com/2011/05/revcompare.png"><img class="aligncenter size-full wp-image-419" title="revCompare" src="http://joeit.files.wordpress.com/2011/05/revcompare.png?w=600&#038;h=314" alt="" width="600" height="314" /></a></p>
<p>Now this particular example was not a great one to use, as I completely rearranged the functions in that module in a later revision so the compare is pretty sloppy, but you get the point.</p>
<p>You&#8217;ll also notice that in the <strong>Log Messages</strong> window, it shows the Author which makes it really easy to determine who made what changes to a given file if you have more than one person working on your scripts.</p>
<p><a href="http://joeit.files.wordpress.com/2010/04/end.jpg"><img class="aligncenter size-full wp-image-254" title="end.jpg" src="http://joeit.files.wordpress.com/2010/04/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/400/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/400/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/400/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=400&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/05/24/kung-fu-for-sysadmins-using-version-control-systems-for-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2010/04/kung-fu.jpg" medium="image">
			<media:title type="html">Kung fu</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/repo-browser.png" medium="image">
			<media:title type="html">repo-browser</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/repo-browser1.png" medium="image">
			<media:title type="html">repo-browser1</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/repo-browser2.png" medium="image">
			<media:title type="html">repo-browser2</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/repo-browser3.png" medium="image">
			<media:title type="html">repo-browser3</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr.png" medium="image">
			<media:title type="html">npp_plugin_mgr</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr1.png" medium="image">
			<media:title type="html">npp_plugin_mgr1</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/npp_plugin_mgr2.png" medium="image">
			<media:title type="html">npp_plugin_mgr2</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/workingset.png" medium="image">
			<media:title type="html">workingSet</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/npp_commit.png" medium="image">
			<media:title type="html">npp_commit</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/npp_commit1.png" medium="image">
			<media:title type="html">npp_commit1</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/npp_commit2.png" medium="image">
			<media:title type="html">npp_commit2</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/revlog1.png" medium="image">
			<media:title type="html">revLog1</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2011/05/revcompare.png" medium="image">
			<media:title type="html">revCompare</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2010/04/end.jpg" medium="image">
			<media:title type="html">end.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>PowerShell Functions: Test-Ping</title>
		<link>http://joeit.wordpress.com/2011/02/22/powershell-functions-test-ping/</link>
		<comments>http://joeit.wordpress.com/2011/02/22/powershell-functions-test-ping/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 14:00:33 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell Functions]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=381</guid>
		<description><![CDATA[This is my first PowerShell function, Test-Ping. This simply returns $true if a given host is pingable, which is pretty useful. This function also makes use of PowerShell&#8217;s built in Comment Based Help.  Here is the code: ##-------------------------------------------------------------------------- ##  FUNCTION.......:  Test-Ping ##  PURPOSE........:  Returns "True" of the host is pingable, or "False" if ##                    not. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=381&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is my first PowerShell function, Test-Ping. This simply returns $true if a given host is pingable, which is pretty useful. This function also makes use of PowerShell&#8217;s built in Comment Based Help.  Here is the code:</p>
<pre> ##--------------------------------------------------------------------------
 ##  FUNCTION.......:  Test-Ping
 ##  PURPOSE........:  Returns "True" of the host is pingable, or "False" if
 ##                    not.
 ##                    This uses the .NET NetworkInformation.Ping method.
 ##  ARGUMENTS......:  A computer name or IP address (just one at a time).
 ##  EXAMPLE........:  Test-Ping 127.0.0.1
 ##                    Test-Ping google.com
 ##  REQUIREMENTS...:  PowerShell 2.0
 ##  NOTES..........: 
 ##--------------------------------------------------------------------------
 function Test-Ping
 {
 &lt;#
 .SYNOPSIS
 Determines if a given device is pingable from the computer where the
 function is used. This can only be used with one device at a time. For
 examples type:
 Get-Help Test-Ping -examples
 .DESCRIPTION
 This function uses the .NET NetworkInformation.Ping method to determine
 if a device is reachable using an ICMP echo message. The Function
 returns $true if the device is pingable, and $false if it is not (or if
 ICMP echo message replies are not returned).
 .EXAMPLE
 Test-Ping google.com
 Will return "True" if DNS is working in the environment that the script
 is run in, and the site is pingable.
 .EXAMPLE
 Test-Ping 127.0.0.1
 Will return "True" if the IPAddress is pingable.
 .EXAMPLE
 exampleScript.ps1
 ##-------------------------------------------------------------
 ## Contents of exampleScript.ps1
 ##-------------------------------------------------------------
 If (!(Test-Ping deadHost)) {
 Write-Host "Host 'deadHost' not Live!" -Fo Red
 }
 Else {
 Write-Host "Host 'deadHost' is Live!" -Fo Cyan
 }
 ##-------------------------------------------------------------

 Assuming that this script also contains the Test-Ping function, this
 script will return the string "Host 'deadHost' not Live!" (unless you
 have a device named "deadHost" in your environment for some reason).
 .NOTES
 NAME......:  Test-Ping
 AUTHOR....:  Joe Glessner
 LAST EDIT.:  18FEB11
 CREATED...:  17AUG10
 .LINK

http://joeit.wordpress.com/2011/02/23/powershell-functions-test-ping/

 #&gt;
 param($ip)
 trap {$false; continue}
 $timeout = 1000
 $object = New-Object system.Net.NetworkInformation.Ping
 (($object.Send($ip, $timeout)).Status -eq 'Success')
 }</pre>
<p>Save the code into a file called C:\test-ping.ps1</p>
<p>Open up powershell, and run this command:</p>
<p><span style="color:#008000;">. c:\test-ping.ps1</span></p>
<p>And hit ENTER (this is called &#8220;dot sourcing&#8221; by the way). Now run this command:</p>
<p><span style="color:#008000;">get-help Test-Ping</span></p>
<p>And  hit ENTER again. Pretty cool eh? It also makes it much easier to  remember how your functions are used from the command line, if you keep  them all in one file, and then dot source that file.</p>
<p><a href="http://joeit.files.wordpress.com/2010/04/end.jpg"><img class="aligncenter size-full wp-image-254" title="end.jpg" src="http://joeit.files.wordpress.com/2010/04/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/381/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=381&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/02/22/powershell-functions-test-ping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2010/04/end.jpg" medium="image">
			<media:title type="html">end.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>New category:  PowerShell Functions</title>
		<link>http://joeit.wordpress.com/2011/02/22/new-category-powershell-functions/</link>
		<comments>http://joeit.wordpress.com/2011/02/22/new-category-powershell-functions/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 13:00:25 +0000</pubDate>
		<dc:creator>Just Joe</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerShell Functions]]></category>

		<guid isPermaLink="false">http://joeit.wordpress.com/?p=361</guid>
		<description><![CDATA[Like many of my fellow IT Professionals out in the world, I&#8217;m digging me some PowerShell. I find it really funny that For all these years the *NIX admins have been laughing their asses off because the Windows admins have not really had a decent shell scripting language. And then came PowerShell. PowerShell is like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=361&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Like many of my fellow IT Professionals out in the world, I&#8217;m digging me some PowerShell. I find it really funny that For all these years the *NIX admins have been laughing their asses off because the Windows admins have not really had a decent shell scripting language. And then came PowerShell. PowerShell is like the command shell and a programming language had a baby. A baby that has superpowers. This is exactly what Windows admins the world over have wanted all this time.</p>
<p>And it&#8217;s so easy to use. In fact, even if you&#8217;ve never opened a PowerShell prompt before, you already know some stuff that you can use in it (assuming that you&#8217;ve opened a command prompt in the last twenty years). Go ahead and open up a PowerShell prompt (Win+R, type: powershell, and then hit ENTER, or just type powershell into the search box on the start menu).</p>
<p>Type: <span style="color:#008000;">dir</span>, and then hit ENTER.</p>
<p>Looks familiar right?</p>
<p>But try this, type:</p>
<p><span style="color:#008000;">get-alias dir</span>, and hit ENTER.</p>
<p>You just ran a PowerShell cmdlet (pronounced &#8220;command let&#8221;).</p>
<p>And there are a ton more. And unlike some people I could name, Microsoft didn&#8217;t forget the other guys when they built PowerShell, try typing the following in the PowerShell Window: <span style="color:#008000;">ls</span>, and then hit ENTER. Yep they make it pretty easy to harness what you know, whether that be *NIX, or Win32.</p>
<p>One of the most awesome things about PowerShell is that you can extend it. Easily. And make the extension seamless. And Functions are pretty awesome. So expect to see more on this here.</p>
<p><a href="http://joeit.files.wordpress.com/2010/04/end.jpg"><img class="aligncenter size-full wp-image-254" title="end.jpg" src="http://joeit.files.wordpress.com/2010/04/end.jpg?w=600" alt=""   /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joeit.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joeit.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joeit.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joeit.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joeit.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joeit.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joeit.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joeit.wordpress.com/361/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joeit.wordpress.com&amp;blog=869974&amp;post=361&amp;subd=joeit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joeit.wordpress.com/2011/02/22/new-category-powershell-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fef429d9baa328daeb32382a4f046c35?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">Just Joe</media:title>
		</media:content>

		<media:content url="http://joeit.files.wordpress.com/2010/04/end.jpg" medium="image">
			<media:title type="html">end.jpg</media:title>
		</media:content>
	</item>
	</channel>
</rss>
