<?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>Mario's Mo' Betta Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/feed.xml</link>
    <description>A tech journal with all my tricks for making things mo&amp;#039; betta. I work for Microsoft. Posts are my own opinions</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:59:33 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SharePoint Online Sandboxed Solutions Disabled</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/sharepoint-online-sandboxed-solutions-disabled</link>
      <pubDate>Tue, 02 Aug 2016 21:52:54 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/?p=625</guid>
      <description><![CDATA[Credit to Brian Jackett who let us know about this change.

The Office Dev Center released this...]]></description>
      <content:encoded><![CDATA[<p style="text-align: center"><a href="https://msdnshared.blob.core.windows.net/media/2016/08/NoSandbox.png"><img width="378" height="276" class="size-full wp-image-626 aligncenter" alt="NoSandbox" src="https://msdnshared.blob.core.windows.net/media/2016/08/NoSandbox.png" /></a></p>
<em>Credit to <a href="https://www.briantjackett.com/">Brian Jackett </a>who let us know about this change.</em>

The Office Dev Center released <a href="https://dev.office.com/blogs/removing-code-based-sandbox-solutions-in-sharepoint-online">this post </a>on July 29, 2016 that confirms they are disabling Sandboxed solutions that reference DLL's in our SharePoint Online service. In addition they're blocking the deployment of new such Sandboxed solutions.

We announced the <a href="https://blogs.msdn.microsoft.com/sharepointdev/2014/01/14/deprecation-of-custom-code-in-sandboxed-solutions/">deprecation of sandboxed solutions way back in 2014 </a>but it will undoubtedly still affect some customers that have forgotten or neglected to update their solutions. There are several options available to users of the service.
<ol>
 	<li>Move the solution to the <a href="https://msdn.microsoft.com/en-us/library/office/fp179930.aspx">SharePoint Add-In model </a>or pure client-side code. This is the recommended, sustainable, long-term solution but will require recoding your solution in a different development model than your developers were used to so it will require some ramping.</li>
 	<li>Remove assembly reference from your Sandbox solution. Many Sandboxed solutions don't use any ancillary DLL's but the Visual Studio template for Sandboxed solutions inserts a stub for such a reference. Remove the reference so that the solutions are purely declarative. Steps for this are <a href="https://support.microsoft.com/en-us/kb/3183084">detailed here</a>.</li>
 	<li><a href="https://twitter.com/bostonmusicdave">Dave Feldman</a> has a <a href="https://bostonmusicdave.com/90">blog post</a> that details a way to remove the reference and assembly from a Sandbox solution without using Visual Studio. This is useful if you no longer have the code. It's definitely a hack but it has been shown to work as a last resort.

<hr />

</li>
</ol>]]></content:encoded>
    </item>
    <item>
      <title>O365 PowerShell error "DTD is prohibited in this XML document"</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/o365-powershell-error-dtd-is-prohibited-in-this-xml-document</link>
      <pubDate>Sun, 05 Jun 2016 11:49:04 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/?p=595</guid>
      <description><![CDATA[I was trying to admin an Office 365 E3 tenant from my home office. I followed the instructions...]]></description>
      <content:encoded><![CDATA[I was trying to admin an Office 365 E3 tenant from my home office. I followed the instructions <a href="https://powershell.office.com/get-started">here</a> and <a href="https://powershell.office.com/scenarios/how-to-connect-to-o365">here.</a> The first link is the installation of the various modules that you'll need, and the second is the set of steps to import those modules and connect to the O365 tenant.

When I tried the <span style="font-family: Courier New;font-size: 0.875em">Connect-SPOService</span> cmdlet I received the following error:

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/post.png"><img class="alignnone size-large wp-image-605" src="https://msdnshared.blob.core.windows.net/media/2016/06/post-1024x45.png" alt="post" width="1024" height="45" /></a>

Research showed that other users encountered this error after following instructions as well. Depending on the ISP, the users would get the "DTD is prohibited..." error. The culplrit is a feature of the ISP's that intercepts unresolved DNS requests and routes them to a web search that is part of the ISP's service offering. The blogs showed that Virgin users experienced this, but I couldn't find if it was the case for my provider in USA, which is Verizon FIOS.

Verizon calls this feature "DNS Assist". That's what was causing me to come up empty while searching for other suggested terms like "Error redirect". You can opt out of this service, but it's not as easy as checking a box. You have to login in to your home router and modify the DNS server settings there. The magic happens when you change the last octet of the Primary and Secondary DNS servers from .12 to .14. This routes DNS requests to a set of servers that do not intercept failed DNS names. It was that interception that was hijacking O365's authentication mechanism.

Full detail can be found on the FIOS articles: <a href="https://www.verizon.com/support/consumer/internet/opt-out-of-dns-assist">Opting Out of DNS Assistance</a>. You have to find your router and click on the link for the specific instructions there.

After modifying the settings the article suggested I restart my computer. I didn't have to do that; the cmdlet worked fine.

<a href="https://msdnshared.blob.core.windows.net/media/2016/06/post1.png"><img class="alignnone size-large wp-image-606" src="https://msdnshared.blob.core.windows.net/media/2016/06/post1-1024x34.png" alt="post" width="1024" height="34" /></a>]]></content:encoded>
    </item>
    <item>
      <title>The Mystery of the missing OneNote Section Group</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/the-mystery-of-the-missing-onenote-section-group</link>
      <pubDate>Mon, 07 Mar 2016 18:41:49 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/?p=553</guid>
      <description><![CDATA[This happened in OneNote 2016 but I imagine it's the same on 2013 as well.

I make extensive use...]]></description>
      <content:encoded><![CDATA[<a href="https://msdnshared.blob.core.windows.net/media/2016/03/Logo_Microsoft_OneNote_2013.gif"><img class=" size-full wp-image-563 aligncenter" src="https://msdnshared.blob.core.windows.net/media/2016/03/Logo_Microsoft_OneNote_2013.gif" alt="Logo_Microsoft_OneNote_2013" width="256" height="256" /></a>
This happened in OneNote 2016 but I imagine it's the same on 2013 as well.

I make extensive use of OneNote and it's Section Groups feature that allow you to create a new group of sections that can be treated as a logical boundary for a related group of sections. I also save my OneNote files inside of OdfB (OneDrive for Business) which is invaluable since I am a mobile worker.

I accidentally saved a PowerPoint presentation inside a OneNote section group. This is possible because it appears that behind the scenes the tabs and section groups are using folders. Well, after I had moved the PowerPoint to the correction folder in OdfB I wanted to remove the rogue section group in OneNote but I kept getting the error: "We couldn't delete this section group because there are non-OneNote files in the same folder. Try this: Open the section group folder in File Explorer, and move or delete all non-OneNote files. Then, delete the section group."

<a href="https://msdnshared.blob.core.windows.net/media/2016/03/No-Sections.png"><img class="  wp-image-573 aligncenter" src="https://msdnshared.blob.core.windows.net/media/2016/03/No-Sections-1024x397.png" alt="No Sections" width="588" height="228" /></a>

Alas, I couldn't do this because the section group folder did not appear in File Explorer when I navigated to the appropriate directory in my Windows 10 client. If I had saved the OneNote notebook in my hard drive directly without OdfB I probably have been able to drill into the section and deleted it.

Since only OneNote could see this location I right-clicked on the notebook and selected "Properties". This gives you a dialog box with a "Change Location" button. Click it and you'll get a standard-looking Save dialog box.

<a href="https://msdnshared.blob.core.windows.net/media/2016/03/Properties.png"><img class="  wp-image-572 aligncenter" src="https://msdnshared.blob.core.windows.net/media/2016/03/Properties-300x156.png" alt="Properties" width="392" height="204" /></a>

This is your poor-man's File Explorer for this purpose. Navigate to the folder that represents the section group that you want to delete, then right-click and select "Delete".

Mystery solved!]]></content:encoded>
    </item>
    <item>
      <title>Upgraded to WordPress, Twitter feed added</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/upgraded-to-wordpress-twitter-feed-added</link>
      <pubDate>Fri, 11 Dec 2015 12:06:55 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/?p=541</guid>
      <description><![CDATA[Looks like I've been sleeping on the latest changes to the TechNet blogs hosting platform. We've...]]></description>
      <content:encoded><![CDATA[<img class=" aligncenter" src="https://s.w.org/about/images/logos/wordpress-logo-stacked-rgb.png" alt="" width="293" height="182" />

Looks like I've been sleeping on the latest changes to the TechNet blogs hosting platform. We've moved to WordPress and since I had a domain https://mariobrandan.com pointing to the old blog url I was not exercising the new WordPress features available to me. I've added a Twitter feed, follow me buttons and changed some colors. Hopefully this will give me more incentive to post more frequently, but only useful info.

Btw, if you haven't yet it's pretty easy to add a Twitter feed. A web dev knows how to do this but some of us lowly bloggers might not have the plugin installed in our hosting provider's instance so we can't just add the WordPress twitter plugin. I looked it up on <a href="https://dev.twitter.com/web/embedded-timelines/user">Twitter's dev site</a>, but if you don't need that level of customization there's an easier way from the commercial Twitter site.

Log in to Twitter &gt; Settings &gt; Widgets &gt; Create New &gt; User Timeline. Configure as desired and it will generate some HTLM/js for you. Go back to WordPress and add a "Text/HTML" widget to your front page and paste the code from the Twitter widget.]]></content:encoded>
    </item>
    <item>
      <title>My Coffee Tips</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/my-coffee-tips</link>
      <pubDate>Thu, 25 Jun 2015 20:20:01 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/2015/06/25/my-coffee-tips/</guid>
      <description><![CDATA[I know this isn&#39;t technology, but I think coffee and techies are spiritually related topics. I...]]></description>
      <content:encoded><![CDATA[<p>I know this isn&#39;t technology, but I think coffee and techies are spiritually related topics. I recently typed this up for a co-worker and I figured I should post it. 
</p><p>I&#39;ve been working from home a lot more and have been tweaking my coffee brewing process for a few months now. 
</p><p>Here&#39;s some tips that I&#39;ve gathered from these here interwebs to make a cup of coffee that will keep the keys clicking on your workstation.
</p><p>1 - Get a coffee grinder. Only grind enough to make the amount of coffee that you&#39;re going to drink at that time; meaning one or two cups at a time. I bought this one after a fair amount of research
</p><p>I bought the <a href="https://www.amazon.com/gp/product/B000VAWXOU?psc=1&amp;redirect=true&amp;ref_=oh_aui_detailpage_o06_s00">Capresso 565.05 Infinity Conical Burr Grinder, Stainless Steel</a> and I&#39;m very happy with it. 
</p><p style="text-align:center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/062615_0319_MyCoffeeTip1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/062615_5F00_0319_5F00_MyCoffeeTip1.png" alt=" " />
	</p><p>2 – Buy an <a href="https://www.amazon.com/Aeropress-Coffee-and-Espresso-Maker/dp/B0047BIWSK/ref=sr_1_1?&amp;s=home-garden&amp;ie=UTF8&amp;qid=1435284613&amp;sr=1-1&amp;keywords=aeropress&amp;pebp=1435284625022&amp;perid=0QN8JTT6KSYCNZ4AAZCH">AeroPress</a> or a <a href="https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&amp;field-keywords=coffee+press">coffee press</a>. The AeroPress is great if you want to travel and have coffee the same way you do at home. This thing needs the paper filters that are listed on the &quot;frequently sold together&quot; section
</p><p style="text-align:center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/062615_0319_MyCoffeeTip2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/062615_5F00_0319_5F00_MyCoffeeTip2.png" alt=" " />
	</p><p>3 – Buy gourmet coffees, whole bean, not ground. Coffee has a short shelf life. Air, light, etc., cause the coffee to lose its flavor. Buy good coffee whole bean and get an air-proof container at the Container Store or even Wal Mart. Drink whatever you buy within 2-3 weeks. 
</p><p><a href="https://www.amazon.com/s/ref=sr_st_featured-rank?rh=n%3A16310101%2Cn%3A!16310211%2Cn%3A16310231%2Cn%3A11136968011%2Cn%3A16318031%2Cp_n_theme_browse-bin%3A5710864011&amp;qid=1435285012&amp;sort=featured-rank">Here&#39;s a list of good coffees</a> for sale on Amazon.
</p><p><a href="https://www.amazon.com/gp/product/B0062JDDI4?psc=1&amp;redirect=true&amp;ref_=oh_aui_detailpage_o03_s00">Here&#39;s the one I&#39;m currently drinking</a> and I&#39;m loving it. It&#39;s a medium roast. Shout out to Peru!
</p><p style="text-align:center;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/062615_0319_MyCoffeeTip3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/062615_5F00_0319_5F00_MyCoffeeTip3.png" alt=" " />
	</p><p>4 - Finally, here&#39;s a primer on coffee beans and roasts. It will help you to vary your tastes from light to dark roasts and everything in between. A relevant quote from the article is 
</p><p style="margin-left:36pt;"><em>&quot;At lighter roasts, the coffee will exhibit more of its &quot;origin character&quot;—the flavors created by its variety, processing, altitude, soil content, and weather conditions in the location where it was grown.<a href="https://en.wikipedia.org/wiki/Coffee_roasting"><span style="color:blue;font-size:9pt;"><sup>[9]</sup></span></a> As the seeds darken to a deep brown, the origin flavors of the bean are eclipsed by the flavors created by the roasting process itself. At darker roasts, the &quot;roast flavor&quot; is so dominant that it can be difficult to distinguish the origin of the beans used in the roast.&quot;
</em></p><p><a href="https://en.wikipedia.org/wiki/Coffee_roasting">https://en.wikipedia.org/wiki/Coffee_roasting#Roasts</a>
	</p><p>5 – I&#39;m boiling the water to 120 degrees, grinding the beans to a coarse grind, and steeping for 3mn, 30 seconds. I find that I like the flavor better than when I go over 4 minutes.
</p><p>If you think I&#39;m being obsessive, then you don&#39;t know enough coffee drinkers that are also techies. Some guys buy their own roasters and get $1k espresso machines. Espresso machine maintenance is too much time for me. The above tips integrate nicely into my daily routine and don&#39;t require a ton of extra time, but it is definitely more time consuming that using a Keurig machine. I can&#39;t go back to that after grinding my own beans.
</p><p>Happy caffeinating!</p>]]></content:encoded>
    </item>
    <item>
      <title>Your Azure credentials have not been set up</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/your-azure-credentials-have-not-been-set-up</link>
      <pubDate>Wed, 22 Apr 2015 19:43:32 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/2015/04/22/your-azure-credentials-have-not-been-set-up/</guid>
      <description><![CDATA[I recently upgraded to version 0.8.16 of Azure PowerShell and I got the following error when trying...]]></description>
      <content:encoded><![CDATA[<p>I recently upgraded to version 0.8.16 of Azure PowerShell and I got the following error when trying Get-AzureVM: &quot;Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials&quot;. <a href="https://blogs.msdn.com/b/devfish/archive/2015/02/12/get-azurevm-your-azure-credentials-have-not-been-set-up-or-have-expired-please-run-add-azureaccount-to-set-up-your-azure-credentials.aspx">JHealy has a blog post</a> describing the error but his solution involved completing the Azure registration process; I&#39;ve been registered and active for a while. The solution was in the comments thread of his post, though. I have a modified approach that suited my needs since I need to clean out several accounts
</p><p><span style="font-family:Courier New;font-size:9pt;">#Remove all accounts<br />Get-AzureAccount | %{Remove-AzureAccount -Name $_.Id}<br />Clear-AzureProfile
</span></p><p>The comment in the other post also suggests running the <span style="font-family:Courier New;font-size:9pt;">Add-AzureAccount</span> cmdlet but I re-registered using the <span style="font-family:Courier New;font-size:9pt;">Get-AzurePublishSettingsFile</span> cmdlet and then then importing per the instructions below. They show up on the web page that is rendered when you execute <span style="font-family:Courier New;font-size:9pt;">Get-AzurePublishSettings</span>. This solved my problem without having to execute <span style="font-family:Courier New;font-size:9pt;">Add-AzureAccount</span>
	</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/042315_0248_YourAzurecr1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/042315_5F00_0248_5F00_YourAzurecr1.png" alt=" " />
	</p>]]></content:encoded>
    </item>
    <item>
      <title>Shut Down Azure VM’s Automatically</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/shut-down-azure-vms-automatically</link>
      <pubDate>Fri, 13 Mar 2015 07:18:20 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/2015/03/13/shut-down-azure-vms-automatically/</guid>
      <description><![CDATA[I’m focusing more on Azure Technologies in order to complement my SharePoint workloads. To this end...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/Shut-Em-Down_4FB73D27.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/Shut_2D00_Em_2D00_Down_5F00_4FB73D27.jpg"><img title="Shut Em Down" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Shut Em Down" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/Shut-Em-Down_thumb_0CDAF8AD.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/Shut_2D00_Em_2D00_Down_5F00_thumb_5F00_0CDAF8AD.jpg" width="382" height="378" /></a></p> <p>I’m focusing more on Azure Technologies in order to complement my SharePoint workloads. To this end I’ve been leveraging my MSDN Azure benefit which gives me $150 of Azure credit every month. Some folks I work with don’t think this is enough but I’ve been able to consistently make this last for several months without hitting my limit.</p> <p>There are some considerations to make this happen.</p> <ul> <li>You can’t just spin up any old VM. Choose the smallest size you can get away with. I’m partial to A0 size for DC’s, and A3’s for most other workloads. </li> <li>Make sure that you choose the “Basic” tier of any of those machine sizes. Basic removes the load-balancing and auto-scaling features. You usually don’t need that for test workloads. See the <a href="https://azure.microsoft.com/en-us/pricing/details/virtual-machines/" target="_blank">Azure VM Pricing</a> page for more details.</li></ul> <p>Finally, like Sticky and Fredro up top, you need to Shut ‘Em Down. Shut down the VM’s as soon as you’re done using them. This will stop using up your credits. Don’t leave a 5 server farm running overnight and expect to be able to pick up in the morning. I know dev’s that have forgotten and then try to open support tickets to get at their data after their allowance has expired, but remember that the MSDN tier only offers subscription support, not technical support. In any case, you’ll need more credits in your account in order to spin those machines back up to get the data.</p> <p>Solution? <a href="https://azure.microsoft.com/en-us/services/automation/" target="_blank">Azure Automation</a>. It’s a feature that allows you to use automate common administrative tasks in your Azure account. There is counterpart called <a href="https://technet.microsoft.com/en-us/library/dn296458.aspx" target="_blank">Service Management Automation (SMA)</a> that is part of the Windows Server 2012 R2, but I’m including that just for reference. Some of the documentation and blog posts out there will reference SMA but you can apply a lot of the same code since it’s all PowerShell. </p> <p><img style="float:left;display:inline;" src="https://mychurchtoolbox.org/wp-content/uploads/2013/07/Book-Running.jpg" width="267" align="left" height="257" alt=" " />Azure Automation allows you to author a PowerShell workflow and publish it as a Runbook, which then can be scheduled.</p> <p>A fellow MSoftie published a runbook to the gallery that shuts down all your machines every night. You can look at the Runbook <a href="https://gallery.technet.microsoft.com/Azure-Automation-Workflow-c5900f99" target="_blank">here</a>.</p> <p>In order to get this to work, you have to create an Azure AD account that can be used by Azure Automation to log into your account. You don’t want to use your Microsoft (Hotmail, Live, Outlook.com) account since they won’t work with Azure Automation. The overview of the this process is to </p> <ul> <li>Create an Azure account in your subscription, </li> <li>Grant it co-administrator rights to manage your subscription resources</li> <li>Create an Automation Credential asset that uses that account</li></ul> <p>John Levy has posted <a href="https://azure.microsoft.com/blog/2014/08/27/azure-automation-authenticating-to-azure-using-azure-active-directory/" target="_blank">detailed instructions</a> on the Azure Blog. Follow those steps first.</p> <p>The next step is to actually create the Runbook. We have a template on the Azure Portal. Select New &gt; App Services &gt; Automation &gt; Runbook</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/68/metablogapi/image_67DD3833.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_67DD3833.png"><img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;display:inline;padding-right:0px;" 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/68/metablogapi/image_thumb_10E7D730.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_thumb_5F00_10E7D730.png" width="590" height="304" /></a></p>    <p>Now select “From Gallery”. You’ll get a dialog listing all the Runbook templates we offer. Select VM Lifecycle Management &gt; Azure Automation Workflow to schedule stopping of all Azure Virtual Machines.</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/68/metablogapi/image_729D2039.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_729D2039.png"><img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" 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/68/metablogapi/image_thumb_1DE447F2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_thumb_5F00_1DE447F2.png" width="580" height="302" /></a></p> <p>Give your Runbook a name and associate it with the Automation account you created above.</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/68/metablogapi/image_3FCFAA76.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_3FCFAA76.png"><img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" 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/68/metablogapi/image_thumb_2D1AB0BF.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_thumb_5F00_2D1AB0BF.png" width="318" height="279" /></a></p> <p>The Runbook will be imported into your account. Once it is finished, click “Edit Runbook” to see the code. The comments will tell you the final steps. You’ll need to add your Automation credential to the script and reference your Azure Subscription. </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/68/metablogapi/image_6F212000.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_6F212000.png"><img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" 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/68/metablogapi/image_thumb_655BB888.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/image_5F00_thumb_5F00_655BB888.png" width="614" height="423" /></a></p> <p>You can test the script by clicking on “test”. Be aware that you may get an error regarding the credential. In the script above you’re asked to enter it in the format <a href="mailto:&ldquo;account@MySubscription.OnMicrosoft.com">“account@MySubscription.OnMicrosoft.com</a>” but I got it to work by simply using the “Account” portion and excluding everything to from and to the right of the “@”, inclusive. So that line would look like</p> <p><font face="Courier New">$Cred = Get-AutomationPSCredential –Name “Account”</font></p> <p>Now that you have this completed, publish the Runbook and create a schedule for it to run every night. Choose midnight or some other time that is appropriate for your work habits. This will save you credits and you’ll never have to worry about forgetting to shut down your machines again. Be aware that the machines will forcefully shut down so if you need the machines to stay up then disable the schedule. Also remember to save your work since it’s tantamount to somebody just switching off a physical server.</p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2007 SiteMap Script</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/sharepoint-2007-sitemap-script</link>
      <pubDate>Wed, 11 Feb 2015 11:17:52 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/2015/02/11/sharepoint-2007-sitemap-script/</guid>
      <description><![CDATA[&nbsp;  I’ve had to dig up some PS scripts from my SP2007 days and I thought I’d share. Here’s a...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</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/68/metablogapi/sharepoint_2007_logo_1F653D74.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/sharepoint_5F00_2007_5F00_logo_5F00_1F653D74.jpg"><img title="Microsoft Office 2003 logos" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="Microsoft SharePoint 2007 logo" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/sharepoint_2007_logo_thumb_539966BA.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/sharepoint_5F00_2007_5F00_logo_5F00_thumb_5F00_539966BA.jpg" width="426" height="87" /></a></p> <p>I’ve had to dig up some PS scripts from my SP2007 days and I thought I’d share. Here’s a script that will crawl all Web Apps in a farm and will output metadata into an xml file for import into your favorite tool, like Excel.</p> <p>The script will list web apps, site collections, webs, SPusers with full control privileges, content database names and sizes for each. Run it on any SP2007 web front end.</p> <p>This is useful if you don’t have any other 3rd party migration or assessment tools installed in your environment.</p> <div style="overflow:auto;height:400px;"><pre class="csharpcode"><span class="rem">#SiteMap.ps1</span>
<span class="rem">#Mario Brandan, Regional Architect, Microsoft</span>
<span class="rem">#Script targets a SharePoint 2007 farm and will output a structured SiteMap.xml file that</span>
<span class="rem">#will list all web apps, site collections and webs, along with webs owners for webs that </span>
<span class="rem">#have broken inheritance as well as those that inherit permissions.</span>

<span class="rem">#Run this locally on any front end</span>
<span class="rem">#Ensure the account has at least &quot;Full Read&quot; permissions on ever Web Application policy in</span>
<span class="rem">#Central administration.</span>

<span class="rem">#v3</span>
<span class="rem">#Added Db Size, Name for Site Collection node</span>
<span class="rem">#Added DisplayName, and Email attributes for FullControlUser node</span>

clear-host

<span class="rem">#Sp2k7 way of loading assembly</span>
[System.Reflection.Assembly]::LoadWithPartialName(<span class="str">&quot;Microsoft.SharePoint&quot;</span>)
[System.Reflection.Assembly]::LoadWithPartialName(<span class="str">&quot;Microsoft.SharePoint.Portal&quot;</span>)

<span class="rem">#this doesn&#39;t work in the SP2k7 farm, probably because get-variable isn&#39;t there.</span>
<span class="rem">#$invocation = (Get-Variable MyInvocation).Value</span>
<span class="rem">#$path = Split-Path $invocation.MyCommand.Path </span>
<span class="rem">#$filePath = &quot;{0}\SiteMap.xml&quot; -f $path</span>

<span class="rem">#Hard code the output file path</span>
$filePath = <span class="str">&quot;C:\dev\SiteMap.xml&quot;</span>
<span class="rem">#Create the output file in xml format.</span>
$xtw = New-Object System.Xml.XmlTextWriter($filePath, $null)

<span class="rem">#Vars to be used in finding Full Control users</span>
$groupNameWildcard = <span class="str">&quot;Owners&quot;</span>
$existingRole = <span class="str">&quot;Full Control&quot;</span>

<span class="rem">#Make it readable</span>
$xtw.Formatting = <span class="str">&#39;Indented&#39;</span>
$xtw.Indentation = 1
$xtw.IndentChar = <span class="str">&quot;`t&quot;</span>

$xtw.WriteStartDocument()
<span class="rem">#xsl</span>
<span class="rem">#$xtw.WriteProcessingInstruction(&quot;xml-stylesheet&quot;, &quot;type=&#39;text/xsl&#39; href=&#39;style.xsl&#39;&quot;)</span>

$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local;

$xtw.WriteStartElement(<span class="str">&quot;Farm&quot;</span>)
$xtw.WriteAttributeString(<span class="str">&quot;FarmVersion&quot;</span>, $farm.Version.ToString())

$websvcs = $farm.Services | where -FilterScript {$_.GetType() <span class="preproc">-eq</span> [Microsoft.SharePoint.Administration.SPWebService]}

Write-Host <span class="str">&quot;Crawling all Web Apps and creating site map...&quot;</span>

<span class="kwrd">foreach</span> ($websvc <span class="kwrd">in</span> $websvcs) {
    <span class="kwrd">foreach</span> ($webapp <span class="kwrd">in</span> $websvc.WebApplications) {
        $xtw.WriteStartElement(<span class="str">&quot;WebApplication&quot;</span>)
        $xtw.WriteAttributeString(<span class="str">&quot;WebAppName&quot;</span>, $webApp.Name)
        $xtw.WriteAttributeString(<span class="str">&quot;WebAppAppPool&quot;</span>, $webApp.ApplicationPool.Name)
        <span class="kwrd">foreach</span> ($site <span class="kwrd">in</span> $webApp.Sites){
            $xtw.WriteStartElement(<span class="str">&quot;SiteCollection&quot;</span>)
            $xtw.WriteAttributeString(<span class="str">&quot;SiteCollectionUrl&quot;</span>, $site.ServerRelativeUrl)
            $xtw.WriteAttributeString(<span class="str">&quot;SiteCollectionOwner&quot;</span>, $site.Owner)
            <span class="rem">#Get the Content Database.</span>
            <span class="rem">#Can&#39;t call $site.ContentDatabase directly due to non CLS-compliant type.</span>
            <span class="rem">#Retrieve the handle to the property using reflection instead.</span>
            $cdbProperty = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty(<span class="str">&quot;DisplayName&quot;</span>)
            $xtw.WriteAttributeString(<span class="str">&quot;ContentDb&quot;</span>, $cdbProperty.GetValue($site.ContentDatabase, $null))
            
            $cdbProperty = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty(<span class="str">&quot;DiskSizeRequired&quot;</span>)
            $xtw.WriteAttributeString(<span class="str">&quot;ContentDbSizeGb&quot;</span>, ($cdbProperty.GetValue($site.ContentDatabase, $null))/1024/1024/1024)
            <span class="kwrd">foreach</span>($web <span class="kwrd">in</span> $site.AllWebs){
                Write-Progress -Activity <span class="str">&quot;Crawling...&quot;</span> -Status $web.url
                $xtw.WriteStartElement(<span class="str">&quot;Web&quot;</span>)
                $xtw.WriteAttributeString(<span class="str">&quot;WebUrl&quot;</span>, $web.Url)
                
                <span class="kwrd">if</span> ($web.HasUniquePerm -and $web.AssociatedOwnerGroup <span class="preproc">-ne</span> $null){
                    $xtw.WriteAttributeString(<span class="str">&quot;HasUniquePermissions&quot;</span>, <span class="str">&quot;True&quot;</span>)
                    $fullControlRoleDef = $web.RoleDefinitions[<span class="str">&quot;Full Control&quot;</span>]
                    <span class="kwrd">foreach</span>($roleAssignment <span class="kwrd">in</span> $web.RoleAssignments){
                        <span class="kwrd">if</span>($roleAssignment.RoleDefinitionBindings.Contains($fullControlRoleDef)){
                            $principal = $roleAssignment.Member
                            <span class="kwrd">if</span> ($principal.GetType() <span class="preproc">-eq</span> [Microsoft.SharePoint.SpGroup]){
                                <span class="kwrd">foreach</span>($fullControlUser <span class="kwrd">in</span> $principal.Users){
                                    $xtw.WriteStartElement(<span class="str">&quot;FullControlUser&quot;</span>)
                                    $xtw.WriteAttributeString(<span class="str">&quot;Name&quot;</span>, $fullControlUser.Name)
                                    $xtw.WriteAttributeString(<span class="str">&quot;LoginName&quot;</span>, $fullControlUser.LoginName)
                                    $xtw.WriteAttributeString(<span class="str">&quot;Email&quot;</span>, $fullControlUser.Email)
                                    $xtw.WriteEndElement()
                                }<span class="rem">#foreach FullControlUser</span>
                            }<span class="rem">#if the principal is an SpGroup</span>
                            <span class="kwrd">else</span>{
                                <span class="rem">#the principal is a user</span>
                                $fullControlUser = $principal.Member
                                $xtw.WriteStartElement(<span class="str">&quot;FullControlUser&quot;</span>)
                                $xtw.WriteAttributeString(<span class="str">&quot;LoginName&quot;</span>, $fullControlUser.LoginName)
                                $xtw.WriteAttributeString(<span class="str">&quot;Email&quot;</span>, $fullControlUser.DistributionGroupEmail)
                                $xtw.WriteEndElement()
                            }<span class="rem">#else                            </span>
                        }<span class="rem">#if Full Control principal</span>
                    }<span class="rem">#foreach RoleAssignment</span>
                }<span class="rem">#if uniquePermissions</span>
                <span class="kwrd">else</span>{
                    $xtw.WriteAttributeString(<span class="str">&quot;HasUniquePermissions&quot;</span>, <span class="str">&quot;False&quot;</span>)
                }
                $xtw.WriteEndElement()<span class="rem">#Web</span>
            }
            $xtw.WriteEndElement() <span class="rem">#Site</span>
        }
        $xtw.WriteEndElement() <span class="rem">#WebApp</span>
    }
}
$xtw.WriteEndElement()
$xtw.WriteEndDocument()
$xtw.Flush()
$xtw.Close()
<span class="rem">#$msg = &quot;Site Map created at {0}&quot; -f $filePath</span>
$msg = <span class="str">&quot;Site Map created at &quot;</span> + $filePath
write-host $msg
write-host <span class="str">&quot;Import into an Excel PivotTable for analysis&quot;</span>
</pre></div>
]]></content:encoded>
    </item>
    <item>
      <title>RIP SharePoint Conference</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/rip-sharepoint-conference</link>
      <pubDate>Tue, 22 Jul 2014 14:33:26 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/2014/07/22/rip-sharepoint-conference/</guid>
      <description><![CDATA[Yesterday Julie White announced that we will have a new unified event in Chicago in 2015 that will...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/SPC-In-Memoriam_016ADA22.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/SPC_2D00_In_2D00_Memoriam_5F00_016ADA22.png"><img title="SPC In Memoriam" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;float:none;padding-top:0px;padding-left:0px;margin-left:auto;border-left:0px;display:block;padding-right:0px;margin-right:auto;" border="0" alt="SPC In Memoriam" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/93/68/metablogapi/SPC-In-Memoriam_thumb_30BC4FAC.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-93-68-metablogapi/SPC_2D00_In_2D00_Memoriam_5F00_thumb_5F00_30BC4FAC.png" width="485" height="484" /></a></p> <p>Yesterday <a href="https://blogs.office.com/2014/07/21/microsofts-unified-technology-event-for-enterprises/" target="_blank">Julie White announced</a> that we will have a new unified event in Chicago in 2015 that will replace several of our trade shows from the past. Most notably for my community of peers, the SharePoint Conference and TechEd. </p> <p>This is bittersweet. I’ve always had a great time at the SharePoint Conference and have enjoyed immensely the time spent learning, meeting, mentoring and getting mentored by the SharePoint community. The change underscores the changing times and the fact that the future is now. Cloud isn’t something that’s going to happen; it’s happening now. Those of us that grew up racking servers in datacenters have already been dealing with cloud deployments for at least several years. Now the big tradeshows are changing, appropriately, to reflect the changing technology. </p> <p>On the plus side, I’m excited about the future of the platform. The product “SharePoint” is evolving and may not remain “SharePoint” for much longer. I have no insight into the product group’s plans but if you look at the history of standalone products like FAST and CMS being integrated into the larger SharePoint product, then you can see that what is past is prologue. I have customers that today won’t even think of the cloud, but a year ago NONE of my customers even considered the cloud.</p> <p>When I came into the workforce the mainframe guys were on their way out and I was the scrappy kid converting all of their green-bar printed COBOL code into Win16/32 applications. They complained that they didn’t want to learn new technologies. Now I’m the same position and I don’t want to make the same mistake they made. </p> <p>I imagine the new conference will focus on the API’s and services that can cross products. Since hosted servers in customer datacenters are becoming less and less common those of us that were infrastructure guys are encouraged to dust off some of the coding skills that we invariably acquired during our career. There’s a new wave of demand for devs coming, just like there was a huge wave of demand for SharePoint folks over the last 10 years. Time to ride a new wave!</p> <p>I’ll be sure to be in Chicago for the 2015 kickoff to this new event, whatever we decide to call it. Cloudapalooza? OfficeChella? </p> <p>Paul Thurrott gives us his analysis on his post <a href="https://windowsitpro.com/industry/rip-teched" target="_blank">R.I.P., TechEd</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Multiple Azure Subscriptions</title>
      <link>https://docs.microsoft.com/archive/blogs/marios_mo_betta_blog/multiple-azure-subscriptions</link>
      <pubDate>Mon, 07 Jul 2014 15:37:34 GMT</pubDate>
      <dc:creator><![CDATA[Mario Brandan]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/marios_mo_betta_blog/2014/07/07/multiple-azure-subscriptions/</guid>
      <description><![CDATA[I am working writing a script that leverages with Azure IaaS via PowerShell. I also have access to...]]></description>
      <content:encoded><![CDATA[<p>I am working writing a script that leverages with Azure IaaS via PowerShell. I also have access to multiple Azure subscriptions from my work. I found out that this can get pretty confusing pretty quick if you also move around from machine to machine like I do. Today I was working on a different machine and after I retrieved my source code from source control I started getting weird errors. Turns out the new machine was referencing a different account via the PowerShell Azure cmdlets. I neeed to reference the correct subscription so I had to run <font size="2" face="Courier New">Get-AzurePublishSettingsFile</font> again on that machine and <font size="2" face="Courier New">Import-AzurePublishSettingsFile</font> to add the subscription.</p> <p>Now I can select between the two subscriptions by using <font size="2" face="Courier New">Select-AzureSubscription</font> and then verifying by issuing <font size="2" face="Courier New">Get-AzureSubscription –Current</font></p> <p>There is the concept of a default subscription in PowerShell. To change the default subscription just issue </p> <p><font size="2" face="Courier New">Select-AzureSubscription -SubscriptionName &quot;[SubscriptionName]&quot; –Default</font></p> <p>To view all subscription names just issue </p> <p><font size="2" face="Courier New">Get-AzureSubscription | select SubscriptionName</font></p>]]></content:encoded>
    </item>
  </channel>
</rss>