<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>LifeCycle Solutions, LLC - Weblog - PowerShell</title>
    <link>http://blog.lifecycle-solutions.com/</link>
    <description>Technical Writing</description>
    <language>en-us</language>
    <copyright>LifeCycle Solutions, LLC</copyright>
    <lastBuildDate>Thu, 06 May 2010 18:59:48 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.2.8279.16125</generator>
    <managingEditor>info@lifecycle-solutions.com</managingEditor>
    <webMaster>info@lifecycle-solutions.com</webMaster>
    <item>
      <trackback:ping>http://blog.lifecycle-solutions.com/Trackback.aspx?guid=88ed8e4a-40b2-42d7-ba41-4117353d7b07</trackback:ping>
      <pingback:server>http://blog.lifecycle-solutions.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.lifecycle-solutions.com/PermaLink,guid,88ed8e4a-40b2-42d7-ba41-4117353d7b07.aspx</pingback:target>
      <dc:creator>Daniel Root</dc:creator>
      <wfw:comment>http://blog.lifecycle-solutions.com/CommentView,guid,88ed8e4a-40b2-42d7-ba41-4117353d7b07.aspx</wfw:comment>
      <wfw:commentRss>http://blog.lifecycle-solutions.com/SyndicationService.asmx/GetEntryCommentsRss?guid=88ed8e4a-40b2-42d7-ba41-4117353d7b07</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
SharePoint 2010 has fairly rich Web Analytics and usage reporting functionality. 
You can see plenty of useful stats and charts across your farm.  However, at
farm level, it’s missing an important feature – email subscriptions.  In site
collection admin, you can subscribe to stats for a given site collection, but in Central
Admin (AFAIK), you can’t set up email subscriptions on the overall farm stats, or
stats for an entire web app.
</p>
        <p>
Hopefully, this feature will be added in the future, but as a quick fix, I whipped
together a wonderful hack that can be used to scrape-and-send just about any of the
reports- or other content as well.
</p>
        <div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, 'Courier New', courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px">
          <div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$wc = <span style="color: #0000ff">new</span>-<span style="color: #0000ff">object</span> net.webclient</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$cred = [System.Net.CredentialCache]::DefaultCredentials;</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$wc.Credentials = $cred</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$reportMarkup = $wc.DownloadString(<span style="color: #006080">"http://yourcentraladmin/_layouts/WebAnalytics/Report.aspx?t=SummaryReport&amp;l=wa&amp;Id=http%3a%2f%2fyourserver%2f&amp;WebAppName=YourWebApp&amp;DURATION=7&amp;CD=false&amp;SHOWANALYZETAB=1"</span>)</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$reportStart = $reportMarkup.IndexOf(<span style="color: #006080">'&lt;table
class="ms-listviewtable"'</span>)</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$reportEnd = $reportMarkup.IndexOf(<span style="color: #006080">'&lt;/table&gt;'</span>,
$reportStart) + 8</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">$reportMarkup = $reportMarkup.Substring($reportStart, $reportEnd - $reportStart)</pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </pre>
            <pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">Send-MailMessage -To you@yourcompany.com -From sharepoint@yourcompany.com -Subject <span style="color: #006080">"Web
Analytics"</span> -Body $reportMarkup -BodyAsHtml -SmtpServer smtpiron</pre>
          </div>
        </div>
        <p>
This script just downloads the page, scrapes the relevant area, and sends it off as
email.  To use, you’ll need to fix up the url, scraping code, and mail addresses
as needed, then schedule in scheduled tasks.
</p>
        <p>
With a little more effort, you could even scrape together an ‘admin’ report to give
you a quick glance at the most relevant Central Admin content such as health, analytics,
and search crawl info.
</p>
        <img width="0" height="0" src="http://blog.lifecycle-solutions.com/aggbug.ashx?id=88ed8e4a-40b2-42d7-ba41-4117353d7b07" />
      </body>
      <title>SharePoint 2010 PowerShell Kung-Fu: Email Farm Web Analytics</title>
      <guid isPermaLink="false">http://blog.lifecycle-solutions.com/PermaLink,guid,88ed8e4a-40b2-42d7-ba41-4117353d7b07.aspx</guid>
      <link>http://blog.lifecycle-solutions.com/2010/05/06/SharePoint2010PowerShellKungFuEmailFarmWebAnalytics.aspx</link>
      <pubDate>Thu, 06 May 2010 18:59:48 GMT</pubDate>
      <description>&lt;p&gt;
SharePoint 2010 has fairly rich Web Analytics and usage reporting functionality.&amp;#160;
You can see plenty of useful stats and charts across your farm.&amp;#160; However, at
farm level, it’s missing an important feature – email subscriptions.&amp;#160; In site
collection admin, you can subscribe to stats for a given site collection, but in Central
Admin (AFAIK), you can’t set up email subscriptions on the overall farm stats, or
stats for an entire web app.
&lt;/p&gt;
&lt;p&gt;
Hopefully, this feature will be added in the future, but as a quick fix, I whipped
together a wonderful hack that can be used to scrape-and-send just about any of the
reports- or other content as well.
&lt;/p&gt;
&lt;div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px"&gt;
&lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$wc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;-&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; net.webclient&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$cred = [System.Net.CredentialCache]::DefaultCredentials;&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$wc.Credentials = $cred&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$reportMarkup = $wc.DownloadString(&lt;span style="color: #006080"&gt;&amp;quot;http://yourcentraladmin/_layouts/WebAnalytics/Report.aspx?t=SummaryReport&amp;amp;l=wa&amp;amp;Id=http%3a%2f%2fyourserver%2f&amp;amp;WebAppName=YourWebApp&amp;amp;DURATION=7&amp;amp;CD=false&amp;amp;SHOWANALYZETAB=1&amp;quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$reportStart = $reportMarkup.IndexOf(&lt;span style="color: #006080"&gt;'&amp;lt;table
class=&amp;quot;ms-listviewtable&amp;quot;'&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$reportEnd = $reportMarkup.IndexOf(&lt;span style="color: #006080"&gt;'&amp;lt;/table&amp;gt;'&lt;/span&gt;,
$reportStart) + 8&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;$reportMarkup = $reportMarkup.Substring($reportStart, $reportEnd - $reportStart)&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;Send-MailMessage -To you@yourcompany.com -From sharepoint@yourcompany.com -Subject &lt;span style="color: #006080"&gt;&amp;quot;Web
Analytics&amp;quot;&lt;/span&gt; -Body $reportMarkup -BodyAsHtml -SmtpServer smtpiron&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
This script just downloads the page, scrapes the relevant area, and sends it off as
email.&amp;#160; To use, you’ll need to fix up the url, scraping code, and mail addresses
as needed, then schedule in scheduled tasks.
&lt;/p&gt;
&lt;p&gt;
With a little more effort, you could even scrape together an ‘admin’ report to give
you a quick glance at the most relevant Central Admin content such as health, analytics,
and search crawl info.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.lifecycle-solutions.com/aggbug.ashx?id=88ed8e4a-40b2-42d7-ba41-4117353d7b07" /&gt;</description>
      <comments>http://blog.lifecycle-solutions.com/CommentView,guid,88ed8e4a-40b2-42d7-ba41-4117353d7b07.aspx</comments>
      <category>PowerShell</category>
      <category>SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://blog.lifecycle-solutions.com/Trackback.aspx?guid=fe9d367d-e750-4ad0-a4fa-179cedb2296e</trackback:ping>
      <pingback:server>http://blog.lifecycle-solutions.com/pingback.aspx</pingback:server>
      <pingback:target>http://blog.lifecycle-solutions.com/PermaLink,guid,fe9d367d-e750-4ad0-a4fa-179cedb2296e.aspx</pingback:target>
      <dc:creator>Brian Parks</dc:creator>
      <wfw:comment>http://blog.lifecycle-solutions.com/CommentView,guid,fe9d367d-e750-4ad0-a4fa-179cedb2296e.aspx</wfw:comment>
      <wfw:commentRss>http://blog.lifecycle-solutions.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fe9d367d-e750-4ad0-a4fa-179cedb2296e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">If you were intrigued by our <a href="http://blog.lifecycle-solutions.com/PowerShell+Rocks.aspx">previous
post on PowerShell</a>, but found it difficult to get started using notepad or your
favorite text editor, try this:  <a href="http://powershell.com/">PowerShellIDE.</a><br />
In addition to having useful editor features (like IntelliSense and collapsing code
blocks) it also uses the groovy new Office 2007 look and feel.  Free download,
for now.<br /><br />
If you're interested in getting a good overview of PowerShell, here's a <a href="http://nexus.realtimepublishers.com/content/EBMPSFinal.pdf">free
e-book</a>.<br /><br /><p></p><img width="0" height="0" src="http://blog.lifecycle-solutions.com/aggbug.ashx?id=fe9d367d-e750-4ad0-a4fa-179cedb2296e" /></body>
      <title>PowerShell IDE</title>
      <guid isPermaLink="false">http://blog.lifecycle-solutions.com/PermaLink,guid,fe9d367d-e750-4ad0-a4fa-179cedb2296e.aspx</guid>
      <link>http://blog.lifecycle-solutions.com/2006/08/09/PowerShellIDE.aspx</link>
      <pubDate>Wed, 09 Aug 2006 17:50:05 GMT</pubDate>
      <description>If you were intrigued by our &lt;a href="http://blog.lifecycle-solutions.com/PowerShell+Rocks.aspx"&gt;previous
post on PowerShell&lt;/a&gt;, but found it difficult to get started using notepad or your
favorite text editor, try this:&amp;nbsp; &lt;a href="http://powershell.com/"&gt;PowerShellIDE.&lt;/a&gt;
&lt;br&gt;
In addition to having useful editor features (like IntelliSense and collapsing code
blocks) it also uses the groovy new Office 2007 look and feel.&amp;nbsp; Free download,
for now.&lt;br&gt;
&lt;br&gt;
If you're interested in getting a good overview of PowerShell, here's a &lt;a href="http://nexus.realtimepublishers.com/content/EBMPSFinal.pdf"&gt;free
e-book&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://blog.lifecycle-solutions.com/aggbug.ashx?id=fe9d367d-e750-4ad0-a4fa-179cedb2296e" /&gt;</description>
      <comments>http://blog.lifecycle-solutions.com/CommentView,guid,fe9d367d-e750-4ad0-a4fa-179cedb2296e.aspx</comments>
      <category>PowerShell</category>
    </item>
  </channel>
</rss>