<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Stuff Steve Says</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/stuffstevesays/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/stuffstevesays/feed.xml</link>
    <description>No, this is not the other, way more famous, Microsoft Steve ... these are the ramblings from an infrastructure consultant in Australia</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:37:24 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Populating a SharePoint List using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/stuffstevesays/populating-a-sharepoint-list-using-powershell</link>
      <pubDate>Thu, 06 Jun 2013 22:35:39 GMT</pubDate>
      <dc:creator><![CDATA[SteveACT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/stuffstevesays/2013/06/06/populating-a-sharepoint-list-using-powershell/</guid>
      <description><![CDATA[Summary: PowerShell can be used to automate tedious and time consuming administrative tasks. In this...]]></description>
      <content:encoded><![CDATA[<p><em><strong>Summary:</strong> PowerShell can be used to automate tedious and time consuming administrative tasks. In this blog post I show how to use PowerShell to take the contents of a CSV file and populate a SharePoint list.</em></p>  <p>I’ve been doing some application analysis for one of my customers recently. As part of this analysis the customer had a list of applications, you know the application name, vendor, version and install count type of list (lists that are important during the planning for an OS Upgrade, when its important to consider things like application compatibility). The problem was simple - the customer had its inventory information extracted to a CSV. However, in a CSV file it wasn't very discoverable and useable on the network, and collaboration meant emailing the list around. They were using SharePoint for collaboration, so I suggested loading the data into SharePoint. </p>  <p>So, I needed to populate a SharePoint list from a CSV file. There were a lot of applications in the list, and manually entering the data into SharePoint would have taken hours/days. Problem right? Nope! PowerShell to the rescue! A short while after the decision to use SharePoint had been made I had a PowerShell Script to populate the data automatically into SharePoint. Running the script and populating the list took seconds.</p>  <p>I know that a lot of my customers are starting to see PowerShell as a critical skill for administrators to have, so I thought I’d write this blog to give a breakdown of how I achieved these results.</p>  <p>To understand what we are doing its probably useful to see the SharePoint list (although the could really be any list you wanted – its just a generic SharePoint list). I started with an empty list which looked like this:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/5658.image_3E956164.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/5658.image_5F00_3E956164.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/2402.image_thumb_634678DB.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/2402.image_5F00_thumb_5F00_634678DB.png" width="568" height="187" /></a></p>  <p>&#160;</p>  <p>As you can see its just a standard list. My list had the columns <em>Application Name, Application Vendor, Application Vendor</em> and <em>Install Count </em>(I know, who’d have thought it given these were the columns I wanted to load from the CSV right?). These names will be important when we get to adding items to the list.</p>  <p>The CSV file is a text file containing four columns – <em>Application Name, Application Vendor, Application Version</em> and <em>Install Count</em>. Before I go any further its important to say that the data in this sample list is just generic data from my lab – it’s not customer data. The data looks like this:</p>  <p><font face="Consolas">Application Name,Application Vendor,Application Version,Install Count      <br /> Microsoft Office Professional Plus 2013,Microsoft,15.0.4420.117,2       <br /> Microsoft Silverlight,Microsoft,5.1.1411.0,2       <br />Microsoft Application Virtualization (App-V) Client Service Pack 1,Microsoft,5.0.114.0,2</font></p>  <h2>PowerShell to the Rescue</h2>  <p>To use SharePoint commands in PowerShell, you will first need to load the SharePoint PowerShell snapin (at this point its worthwhile pointing out that unless you want to configure PowerShell remoting then you’ll need to run this script on one of SharePoint servers – remoting will probably be a topic for another post one day). To load the PowerShell SharePoint snapin we first need to check whether its already loaded, and if not load it. The following code will load the SharePoint PowerShell snapin:</p>  <p><font size="2" face="Consolas"># Setup the correct modules for SharePoint Manipulation      <br /></font><font size="2" face="Consolas">if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )      <br />{&#160;&#160;&#160;&#160; <br />&#160;&#160; </font><font size="2" face="Consolas">Add-PsSnapin Microsoft.SharePoint.PowerShell      <br />}       <br />$host.Runspace.ThreadOptions = &quot;ReuseThread&quot;</font></p>   <p>The above code checks to see if the Microsoft.SharePoint.Powershell PowerShell snapin is loaded using the <strong>Get-PSSnapin</strong> command, and if it isn't it is loaded using the <strong>Add-PsSnapin</strong>. The last line of the code, sets up efficient memory/thread usage.</p>  <p>It is important to note that the account that connects to SharePoint must have the <em>SharePoint_Shell_Access</em> role (see <a href="https://technet.microsoft.com/en-us/library/ff607596.aspx">https://technet.microsoft.com/en-us/library/ff607596.aspx</a>) for this to work.</p>  <p>After the SharePoint PowerShell snapin is loaded we can then open the connection to the SharePoint and to list that we want. The code for that looks like this:</p>  <p><font size="2" face="Consolas">#Open SharePoint List      <br />$SPServer=&quot;https://LAB-SPS1&quot;       <br />$SPAppList=&quot;/Lists/Application List/&quot;       <br />$spWeb = Get-SPWeb $SPServer       <br />$spData = $spWeb.GetList($SPAppList)</font></p>   <p>In the above code we connect to SharePoint using the <strong>Get-SPWeb</strong> command, and then <strong>.GetList</strong> to load the required SharePoint list (in my example a list called Application List) into an array called $spData. </p>  <p>Next we need to load the inventory data from the CSV file. PowerShell makes reading CSV files a no-brainer – PowerShell has the<em> </em><strong>Import-CSV</strong> command. To code to load the CSV file looks like this:</p>  <p><font size="2" face="Consolas">$InvFile=&quot;appinvent.csv&quot;      <br /># Get Data from Inventory CSV File       <br />$FileExists = (Test-Path $InvFile -PathType Leaf)       <br />if ($FileExists) {       <br />&#160;&#160; &quot;Loading $InvFile for processing...&quot;       <br />&#160;&#160; $tblData = import-csv $InvFile       <br />} else {       <br />&#160;&#160; &quot;$InvFile not found - stopping import!&quot;       <br />&#160;&#160; exit       <br />}</font></p>   <p>The code snippet above checks to see if the file <em>appinvent.csv</em> exists (if it doesn't it errors out and stops – I mean hey if the file doesn't exist, there isn't much to load into SharePoint is there?). If the file exists the <strong>Import-CSV </strong>command is called to load the entire CSV into a variable called $tblData. Import-CSV takes the first line of data and turns the information into the column headings. In my example $tblData ends up being an array with four columns with the columns named Application Name, Application Vendor, Application Version and Install Count. If your CSV file doesn't have a header row, just add&#160; –Header ColumnName1,ColumnName2, ColumnName3 to the Import-CSV command.</p>  <p>From here it’s a matter of looping through the data contained in $tblData,&#160; loading each line into the SharePoint list. The code for that looks like this:</p>  <p><font size="2" face="Consolas"># Loop through Applications add each one to SharePoint      <br />&quot;Uploading data to SharePoint....&quot;       <br />foreach ($row in $tblData) {       <br />&#160;&#160; &quot;Adding entry for &quot;+$row.&quot;Application Name&quot;.ToString()       <br />&#160;&#160; $spItem = $spData.AddItem()       <br />&#160;&#160; $spItem[&quot;Application Name&quot;] = $row.&quot;Application Name&quot;.ToString()       <br />&#160;&#160; $spItem[&quot;Application Vendor&quot;] = $row.&quot;Application Vendor&quot;.ToString()       <br />&#160;&#160; $spItem[&quot;Application Version&quot;] = $row.&quot;Application Version&quot;.ToString()       <br />&#160;&#160; $spItem[&quot;Install Count&quot;] = $row.&quot;Install Count&quot;.ToString()       <br />&#160;&#160; $spItem.Update()       <br />}</font></p>   <p>In the above code the <strong>$spItem = $spData.AddItem()</strong> PowerShell code is the same as pressing the “Add Item” button in a SharePoint list. The next four lines populate the columns in SharePoint from the CSV. After populating the columns, <strong>$spItem.Update()</strong> is used to commit the information to SharePoint – its the equivalent to clicking Save on a New Item dialog box.</p>  <p>Finally, we need to close our connection to SharePoint, which can be done by the following code:</p>  <p><font size="2" face="Consolas">&quot;Upload Complete&quot;      <br />$spWeb.Dispose()</font></p>  <p>So there it is … a PowerShell script to take a CSV file and upload it to SharePoint. After running on that data the SharePoint list now looks like this:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/5086.image_3ADFAF69.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/5086.image_5F00_3ADFAF69.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/8546.image_thumb_17CF3DF9.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/8546.image_5F00_thumb_5F00_17CF3DF9.png" width="581" height="184" /></a></p>  <p>As you can see all the CSV data is loaded. Here is the complete code for the PowerShell script:</p>  <p><font size="2" face="Consolas">#--------------------------------------------------------------------     <br /># </font><font size="2" face="Consolas">Name: Load CSV into SharePoint List     <br /></font><font size="2" face="Consolas"># NOTE</font><font size="2" face="Consolas">: No warranty is expressed or implied by this code – use it at your      <br /># own risk. If it doesn't work or</font><font size="2" face="Consolas"> breaks anything you are on your own      <br />#--------------------------------------------------------------------</font></p>  <p><font size="2" face="Consolas"></font></p>  <p><font size="2" face="Consolas"># Setup the correct modules for SharePoint Manipulation      <br />if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) </font><font size="2" face="Consolas">-eq $null )      <br />{       <br />&#160;&#160; Add-PsSnapin Microsoft.SharePoint.PowerShell       <br />}       <br />$host.Runspace.ThreadOptions = &quot;ReuseThread&quot; </font></p> <font size="2" face="Consolas"></font>  <p><font size="2" face="Consolas">#Open SharePoint List      <br />$SPServer=https://LAB-SPS1       <br />$SPAppList=&quot;/Lists/Application List/&quot;       <br />$spWeb = Get-SPWeb $SPServer       <br />$spData = $spWeb.GetList($SPAppList) </font></p>  <p><font size="2" face="Consolas">$InvFile=&quot;appinvent.csv&quot;      <br /># Get Data from Inventory CSV File       <br />$FileExists = (Test-Path $InvFile -PathType Leaf)       <br />if ($FileExists) {       <br />&#160;&#160; &quot;Loading $InvFile for processing...&quot;       <br />&#160;&#160; $tblData = Import-CSV $InvFile       <br />} else {       <br />&#160;&#160; &quot;$InvFile not found - stopping import!&quot;      <br />&#160;&#160; exit       <br />} </font></p>  <p><font size="2" face="Consolas"># Loop through Applications add each one to SharePoint </font></p>  <p><font size="2" face="Consolas">&quot;Uploading data to SharePoint....&quot; </font></p>  <p><font size="2" face="Consolas">foreach ($row in $tblData)      <br />{       <br />&#160;&#160; &quot;Adding entry for &quot;+$row.&quot;Application Name&quot;.ToString()       <br />&#160;&#160; $spItem = $spData.AddItem()       <br />&#160;&#160; $spItem[&quot;Application Name&quot;] = $row.&quot;Application Name&quot;.ToString()       <br />&#160;&#160; $spItem[&quot;Application Vendor&quot;] = $row.&quot;Application Vendor&quot;.ToString()       <br />&#160;&#160; $spItem[&quot;Application Version&quot;] = $row.&quot;Application Version&quot;.ToString()       <br />&#160;&#160; $spItem[&quot;Install Count&quot;] = $row.&quot;Install Count&quot;.ToString()       <br />&#160;&#160; $spItem.Update()       <br />} </font></p>  <p><font size="2" face="Consolas">&quot;---------------&quot;      <br /></font><font size="2" face="Consolas">&quot;Upload Complete&quot; </font></p>  <p><font size="2" face="Consolas">$spWeb.Dispose()</font></p> ]]></content:encoded>
    </item>
    <item>
      <title>Windows Azure Services In Australia</title>
      <link>https://docs.microsoft.com/archive/blogs/stuffstevesays/windows-azure-services-in-australia</link>
      <pubDate>Mon, 20 May 2013 17:46:00 GMT</pubDate>
      <dc:creator><![CDATA[SteveACT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/stuffstevesays/2013/05/20/windows-azure-services-in-australia/</guid>
      <description><![CDATA[Woke up this morning to some awesome news ...&nbsp;Microsoft is bringing Windows Azure data centres...]]></description>
      <content:encoded><![CDATA[<p>Woke up this morning to some awesome news ...&nbsp;Microsoft is bringing Windows Azure data centres onshore here to Australia!!</p>
<p>I know cool hey? Lots of scenarios can now open up for our most security conscious of customers. Instead of rehashing a lot of information, I thought I'd share two great articles that give a great deal of information relating to Azure services:</p>
<p>Firstly the announcement blog by Toby Bowers:</p>
<p><a href="https://blogs.msdn.com/b/ausblog/archive/2013/05/16/windows-azure-expands-downunder.aspx">https://blogs.msdn.com/b/ausblog/archive/2013/05/16/windows-azure-expands-downunder.aspx</a></p>
<p>And secondly, a great article on the security implications of locally hosted services by&nbsp;my colleague Rocky Heckman:</p>
<p><a href="https://blogs.msdn.com/b/rockyh/archive/2013/05/21/windows-azure-in-australia-how-does-that-change-your-security-outlook.aspx">https://blogs.msdn.com/b/rockyh/archive/2013/05/21/windows-azure-in-australia-how-does-that-change-your-security-outlook.aspx</a></p>
<p>Go give them both a read - they're well worth it.</p>
<p>Look forward to sharing all of the interesting scenarios for the use of local Azure services with my customers.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>HOWTO: Turn on/off SIM Pin in Windows Phone 8 (WP8)</title>
      <link>https://docs.microsoft.com/archive/blogs/stuffstevesays/howto-turn-onoff-sim-pin-in-windows-phone-8-wp8</link>
      <pubDate>Fri, 17 May 2013 05:19:00 GMT</pubDate>
      <dc:creator><![CDATA[SteveACT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/stuffstevesays/2013/05/17/howto-turn-onoff-sim-pin-in-windows-phone-8-wp8/</guid>
      <description><![CDATA[Following up from my post yesterday on how to take a screenshot in Windows Phone 8, here&rsquo;s...]]></description>
      <content:encoded><![CDATA[<p>Following up from my post yesterday on how to take a screenshot in Windows Phone 8, here&rsquo;s another quick tip. This one comes thanks to one of my friends who asked how to turn off SIM security.</p>
<p>Often when mobile phones are delivered they come with a SIM pin turned on. When integrating these in an enterprise mobility strategy, the phones often end up with a corporate-mandated password as well.</p>
<p>To some, entering both a SIM pin and a corporate password is an annoyance &ndash; and they would rather only enter their corporate password and turn off SIM security.</p>
<p>In publishing this &ldquo;how to&rdquo; guide, I certainly don&rsquo;t want to suggest that SIM security is not important, I still have both SIM pin and corporate password turned on. I merely provide the instructions for those to who want to have this set up. To turn off the SIM password do the following.</p>
<p>1. Unlock your phone.</p>
<p>2. Swipe right and select Settings.</p>
<p>3. Swipe right to Applications tab, select Phone (shown in the following screen).</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/1067.wp_ss_20130517_0001_58D4D577.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/1067.wp_5F00_ss_5F00_20130517_5F00_0001_5F00_58D4D577.jpg"><img style="display: inline; background-image: none;" title="wp_ss_20130517_0001" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/1004.wp_ss_20130517_0001_thumb_53887F77.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/1004.wp_5F00_ss_5F00_20130517_5F00_0001_5F00_thumb_5F00_53887F77.jpg" alt="wp_ss_20130517_0001" width="148" height="244" border="0" /></a></p>
<p>4. Scroll down to the bottom and turn off SIM Security (you can also change the SIM password here if you desire).</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/2474.wp_ss_20130517_0002_02D9F502.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/2474.wp_5F00_ss_5F00_20130517_5F00_0002_5F00_02D9F502.jpg"><img style="display: inline; background-image: none;" title="wp_ss_20130517_0002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/60/metablogapi/5554.wp_ss_20130517_0002_thumb_41CE064E.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-60-metablogapi/5554.wp_5F00_ss_5F00_20130517_5F00_0002_5F00_thumb_5F00_41CE064E.jpg" alt="wp_ss_20130517_0002" width="148" height="244" border="0" /></a></p>
<p>SIM Security is now turned off, and no SIM pin will be requested on boot. You can turn SIM security back on in the same manner as above as required.</p>
<p>Till next time.</p>]]></content:encoded>
    </item>
    <item>
      <title>HOWTO: Take a Screenshot in Windows Phone 8 (WP8)</title>
      <link>https://docs.microsoft.com/archive/blogs/stuffstevesays/howto-take-a-screenshot-in-windows-phone-8-wp8</link>
      <pubDate>Wed, 15 May 2013 16:46:11 GMT</pubDate>
      <dc:creator><![CDATA[SteveACT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/stuffstevesays/2013/05/15/howto-take-a-screenshot-in-windows-phone-8-wp8/</guid>
      <description><![CDATA[Hey everyone,
It would appear that I received a lot of interest in my first blog post....]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Hey everyone,</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">It would appear that I received a lot of interest in my first blog post. Unfortunately, most people who arrived at my blog&nbsp;probably thought that I was another more famous Steve in Microsoft. So, just to clarify, I am an Infrastructure Consultant from Microsoft Services in Canberra, Australia.</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Anyway, onto the topic of the post. This is a simple quick blog post, which demonstrates how to take a screenshot on Windows Phone 8 (WP8). I can't believe how simple it is, but I found it out by accident, so I thought I'd share it with you all:</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">To take a screenshot on WP8, simply press and release the <strong><em>Power</em></strong> and <strong><em>Windows</em></strong> buttons at the same time (ala control-alt-delete).&nbsp;The phone will take a screenshot, and it will be stored in a new folder in your photos called Screenshots (under the Photos - Albums link).</span></p>
<p><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: small;">Simple hey?</span></p>
<p>Till next time....</p>
<p>Steve</p>]]></content:encoded>
    </item>
    <item>
      <title>The Obligatory First Post</title>
      <link>https://docs.microsoft.com/archive/blogs/stuffstevesays/the-obligatory-first-post</link>
      <pubDate>Wed, 21 Mar 2012 20:38:00 GMT</pubDate>
      <dc:creator><![CDATA[SteveACT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/stuffstevesays/2012/03/21/the-obligatory-first-post/</guid>
      <description><![CDATA[Hey everyone!
This is of course one of those obligatory first blog posts that everyone writes where...]]></description>
      <content:encoded><![CDATA[<p>Hey everyone!</p>
<p>This is of course one of those obligatory first blog posts that everyone writes where they tell you why they started blogging.</p>
<p>If you&rsquo;ve hit this blog thinking you were going to get another (way more famous) Microsoft Steve &hellip; then you may be disappointed - or perhaps not &ndash; I&rsquo;ll stop making judgements for you shall I?</p>
<p>To introduce myself I am Stephen Harden a consultant from Microsoft Enterprise Services in Australia.</p>
<p>The purpose of my blog is to provide snippets of information on products, ways to achieve things using Microsoft products, and generally stuff that I found useful that I hope you do to.</p>
<p>The focus of my day-to-day job is working with Australian Federal Government customers so a lot of what I write will be focused around enterprises and large organisations.</p>
<p>Well first post over &hellip; See you again soon</p>]]></content:encoded>
    </item>
  </channel>
</rss>