<?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>DevOps and ConfigMgr Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ccarroll/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ccarroll/feed.xml</link>
    <description>DevOps and ConfigMgr</description>
    <lastBuildDate>Fri, 01 Dec 2017 16:37:04 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Tips For Passing the CCSP Exam</title>
      <link>https://docs.microsoft.com/archive/blogs/ccarroll/tips-for-passing-the-ccsp-exam</link>
      <pubDate>Fri, 01 Dec 2017 11:37:03 GMT</pubDate>
      <dc:creator><![CDATA[ChadCarroll]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ccarroll/?p=965</guid>
      <description><![CDATA[A few months ago I passed the Cloud Certified Security Professional (CCSP) exam from ISC2.org and...]]></description>
      <content:encoded><![CDATA[<span style="font-family: Arial">A few months ago I passed the Cloud Certified Security Professional (CCSP) exam from ISC2.org and afterword's a lot friends and colleagues were interested in my experience. The one questions that most people studying for the CCSP exam want to know is "How does this exam compare in difficulty to the CISSP?" If you're unfamiliar with the CISSP exam, it's considered the elite Cyber Security exam and the most globally recognized standard of achievement in the industry. It's a grueling 6 hours test that takes weeks of preparation.
</span>
<h1>What is CCSP?</h1>
<span style="font-family: Arial">The CCSP is a global credential that represents the highest standard for cloud security expertise. It was co-created by (ISC)² and Cloud Security Alliance — leading stewards for information security and cloud computing security. When you earn this cloud security certification, you prove you have deep knowledge and hands-on experience with cloud security architecture, design, operations and service orchestration.
</span>

<span style="font-family: Arial">To qualify for the CISSP certification, you must have:
</span>
<ul>
 	<li><span style="font-family: Arial">A minimum of five years cumulative, paid, full-time work experience in information technology
</span></li>
 	<li><span style="font-family: Arial">Of which five years must be in information security and one year in two or more of the eight domains of the CISSP Common Body of Knowledge (CBK)
</span></li>
</ul>
<span style="font-family: Arial">To qualify for the CCSP certification, you must have:
</span>
<ul>
 	<li><span style="font-family: Arial">A minimum of five years cumulative, paid, full-time work experience in information technology
</span></li>
 	<li><span style="font-family: Arial">Of which three years must be in information security and one year in one or more of the six domains of the CCSP Common Body of Knowledge (CBK)
</span></li>
</ul>
<h1>How does the CCSP compare to the CISSP?</h1>
<span style="color: #333333;font-family: Arial">Ok, so this is the one question everyone wants to know and is somewhat subjective. I invested 2 months of focused studying to the CISSP exam and after answering the last question on the test, I thought I'd failed. It was difficult and there were a lot of questions that I felt had two answers. Surprising, and thankfully I passed the exam! So, what worked the first time to pass the CISSP exam must also work for the CCSP. For the CCSP exam I also dedicated 2 months of study the exam. Even though there are only 6 domains for the CCSP compared to 8 for the CISSP you need to take each domain seriously. Chances are if you fail a single domain you'll fail the exam.
</span>

<span style="color: #333333;font-family: Arial">Below is a comparison table between the CISSP and CCSP. Of course, the study time and difficulty rating is based on my own experience and will vary by individual.
</span>
<div>
<table style="border-collapse: collapse" border="0"><colgroup> <col style="width: 312px" /> <col style="width: 312px" /> <col style="width: 312px" /></colgroup>
<tbody valign="top">
<tr style="background: #bdd6ee">
<td style="padding-left: 11px;padding-right: 11px;border: solid 0.5pt"><span style="color: #333333;font-family: Arial"><strong>Topic</strong></span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: solid 0.5pt;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial"><strong>CISSP</strong></span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: solid 0.5pt;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial"><strong>CCSP</strong></span></p>
</td>
</tr>
<tr>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: solid 0.5pt;border-bottom: solid 0.5pt;border-right: solid 0.5pt"><span style="color: #333333;font-family: Arial">Number of questions</span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">250</span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">200</span></p>
</td>
</tr>
<tr>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: solid 0.5pt;border-bottom: solid 0.5pt;border-right: solid 0.5pt"><span style="color: #333333;font-family: Arial">Exam Hours</span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">6</span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">4</span></p>
</td>
</tr>
<tr>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: solid 0.5pt;border-bottom: solid 0.5pt;border-right: solid 0.5pt"><span style="color: #333333;font-family: Arial">Domains</span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">8</span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">6</span></p>
</td>
</tr>
<tr>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: solid 0.5pt;border-bottom: solid 0.5pt;border-right: solid 0.5pt"><span style="color: #333333;font-family: Arial">Exam Costs</span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">$599</span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">$549</span></p>
</td>
</tr>
<tr>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: solid 0.5pt;border-bottom: solid 0.5pt;border-right: solid 0.5pt"><span style="color: #333333;font-family: Arial">Preparation\Study Time</span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">300 hrs</span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">300 hrs</span></p>
</td>
</tr>
<tr>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: solid 0.5pt;border-bottom: solid 0.5pt;border-right: solid 0.5pt"><span style="color: #333333;font-family: Arial">Difficulty on 1-10 scale</span></td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">9</span></p>
</td>
<td style="padding-left: 11px;padding-right: 11px;border-top: none;border-left: none;border-bottom: solid 0.5pt;border-right: solid 0.5pt">
<p style="text-align: center"><span style="color: #333333;font-family: Arial">5</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<h1>How did I prepare for the CCSP?</h1>
In preparation for the CCSP exam I used the following resources to successfully pass the exam.
<h2><span style="font-size: 14pt">Official (ISC)2 CCSP Self-Paced Training
</span></h2>
<p style="margin-left: 36pt"><span style="color: #333333;font-family: Arial">This is the official training material provided by (ISC)2 and available for sale on their website. There often special deals for this training and can be purchased for $295.
</span></p>

<ul style="margin-left: 72pt">
 	<li><span style="color: #333333;font-family: Arial">Official (ISC)² CCSP student workbook (electronic version)
</span></li>
 	<li><span style="color: #333333;font-family: Arial">Interactive flash cards.
</span></li>
 	<li><span style="color: #333333;font-family: Arial">Post-assessment practice questions to gauge exam readiness
</span></li>
 	<li><span style="color: #333333;font-family: Arial">120 days of access to the recordings and course content from time of purchase</span></li>
</ul>
Opinion: I found the <span style="color: #333333;font-family: Arial">Official (ISC)² CCSP student workbook to be the best resource of material that aligns with the exam questions. The 120 days of access to recordings contained 40 hours of videos. However, I found the Official student workbook to be the best reading material and content that aligned with the test.</span>
<h2><span style="font-size: 14pt">Official (ISC)2 CCSP Official Study Guide
</span></h2>
<span style="color: #333333;font-family: Arial">This is the official study guide reviewed and endorsed by (ISC)2 and contains:
</span>
<ul style="margin-left: 72pt">
 	<li><span style="color: #333333;font-family: Arial">334 pages of reading content
</span></li>
 	<li><span style="color: #333333;font-family: Arial">Exercises, and chapter review
</span></li>
 	<li><span style="color: #333333;font-family: Arial">Hundreds of flashcards
</span></li>
 	<li><span style="color: #333333;font-family: Arial">Two complete practice exams
</span></li>
 	<li><span style="color: #333333;font-family: Arial">PDF glossary
</span></li>
</ul>
<span style="color: #333333;font-family: Arial">Opinion: I used the CCSP Official Study Guide as a second major resource in preparation. The content was much deeper than that of the Student Workbook and the exam questions at the end of each chapter were a resource to reinforce your learning. However, after taking the exam I personally felt the level of detail in this guide was much deeper than the questions asked on the exam.
</span>
<h2>Quizlet</h2>
<span style="color: #333333;font-family: Arial">Quizlet is a mobile &amp; web-based study application with tons of CCSP flash cards publicly available. https://quizlet.com/
</span>

<span style="color: #333333;font-family: Arial">Opinion: I found Quizlet to be extremely valuable in learning definitions. The mobile app is very easy to use and has several methods for learning that I found to be fun and helpful. I created my own set of personalized practice questions, but there are quite a few publicly available flash sets readily available.
</span>
<h1>Final Thoughts</h1>
<span style="color: #333333;font-family: Arial">The CCSP exam is not as difficult as the CISSP exam but that doesn't mean you should take it lightly. Study, study, and then study some more. If you use the study material presented above, you have an excellent chance at passing the exam on your first attempt. Similar to the CISSP, the exam content is a "mile wide and an inch deep" so it's important that you study all the domains equally.
</span>

<span style="color: #333333;font-family: Arial">The official testing center for (ISC)2 is PearsonVue. <a href="https://home.pearsonvue.com/test-taker.aspx">https://home.pearsonvue.com/test-taker.aspx</a>. I found when scheduling my exam that seats were extremely limited and the first available was 3 weeks out in my city. I've heard from others similar scheduling challenges. On this note, I recommend scheduling your exam well in advance. Not only will you be able to get the date and time that you want, but it will reinforce your commitment to your study plan.
</span>

<span style="color: #333333;font-family: Arial">Please let me know if you found this exam prep guide helpful and</span> g<span style="color: #333333;font-family: Arial">ood luck on your way to becoming a CCSP.
</span>

<span style="color: #333333;font-family: Arial">Source - https://www.isc2.org/Certifications/CCSP
</span>]]></content:encoded>
    </item>
    <item>
      <title>Use PowerShell to Send email from O365 Account</title>
      <link>https://docs.microsoft.com/archive/blogs/ccarroll/use-powershell-to-send-email-from-o365-account</link>
      <pubDate>Tue, 28 Nov 2017 20:27:59 GMT</pubDate>
      <dc:creator><![CDATA[ChadCarroll]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ccarroll/?p=935</guid>
      <description><![CDATA[Prior to PowerShell 5.0 to send an email you had to use the .NET System.Net.Mail namespace. Now with...]]></description>
      <content:encoded><![CDATA[<p style="background: #fffffe"><span style="color: #333333;font-size: 12pt">Prior to PowerShell 5.0 to send an email you had to use the .NET System.Net.Mail namespace. Now with PowerShell 5.0 and higher you can easily send email messages using the cmdlet <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-5.1">Send-MailMessage</a><span style="color: blue">. <span style="color: #333333">. You can use any valid SMTP server but for our example we'll use an O365 account. Just make sure you set your smtp address to <strong>smtp.office365.com</strong> and port to <strong>587</strong> and you should be all set.
</span></span></span></p>
<p style="background: #fffffe"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/112917_0126_UsePowerShe1.png" /><span style="color: #333333;font-family: Consolas;font-size: 10pt">
</span></p>
<p style="background: #fffffe"><span style="color: #333333;font-size: 12pt">Note: Make sure you use -UseSSL or else you'll receive a <span style="color: red">Send-MailMessage : The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM<span style="color: #333333">
</span></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Upload and Download Files using a SAS Token</title>
      <link>https://docs.microsoft.com/archive/blogs/ccarroll/upload-and-download-files-using-a-sas-token</link>
      <pubDate>Sun, 26 Nov 2017 09:39:34 GMT</pubDate>
      <dc:creator><![CDATA[ChadCarroll]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/ccarroll/?p=65</guid>
      <description><![CDATA[A SAS token can be used to grant temporary access to your storage without exposing your storage key....]]></description>
      <content:encoded><![CDATA[<span style="font-size: 12pt">A SAS token can be used to grant temporary access to your storage without exposing your storage key. By leveraging a SAS token we can grant objects temporary access to our container with the defined permissions and a defined time. If you're unfamiliar or want the details of how a SAS token works then head over to <a href="https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1">https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1</a>.
</span>

<strong><span style="font-size: 12pt">Objective</span>:
</strong>

<span style="font-size: 12pt">Today we will simplify the process by demonstrating how easy it is to create and use a SAS Token and prove it works by uploading and downloading files.
</span>

<span style="font-size: 12pt"><strong>Implementation:
</strong></span>

<span style="font-size: 12pt"><strong>Step 1:</strong> The first step if you haven't' already done so is to create a resource group and storage account.
</span>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">ResourceGroupName <span style="color: darkgray">= <span style="color: darkred">'LabRG1'<span style="color: #333333">
</span></span></span></span></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">StorageAccountName <span style="color: darkgray">= <span style="color: darkred">'labsa1'<span style="color: #333333">
</span></span></span></span></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">ContainerName <span style="color: darkgray">= <span style="color: darkred">'labcn1'
</span></span></span></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkgreen;font-size: 12pt"><em>#create new resource group and storage account
</em></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: blue;font-size: 12pt">New-AzureRmResourceGroup<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> -Location <span style="color: darkblue">$<span style="color: orangered">location<span style="color: #333333">
</span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: blue;font-size: 12pt">New-AzureRmStorageAccount<span style="color: #333333"> -ResourceGroupName <span style="color: darkblue">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">StorageAccountName<span style="color: #333333"> -Type Standard_LRS -Location <span style="color: darkred">"East US"<span style="color: #333333">
</span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: blue;font-size: 12pt">Set-AzureRmCurrentStorageAccount<span style="color: #333333"> -ResourceGroupName <span style="color: darkblue">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">StorageAccountName<span style="color: #333333">
</span></span></span></span></span></span></span></span></p>
<span style="font-size: 12pt"><strong>Step 2:</strong> Next, create a new storage container.
</span>
<p style="margin-left: 36pt"><span style="font-size: 12pt"><span style="color: darkgreen"><em># create a container</em></span>
</span></p>
<p style="margin-left: 36pt"><span style="color: blue;font-size: 12pt">New-AzureStorageContainer<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">ContainerName<span style="color: #333333"> -Permission Off
</span></span></span></span></span></p>
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/112617_2009_UploadandDo1.png" /><span style="font-size: 12pt">
</span></p>
<p style="margin-left: 36pt"><span style="font-size: 12pt">Note: Set the container Permission to Off so that anonymous access is turned off. Access will be granted with the SAS token created in the next step.
</span></p>
<span style="font-size: 12pt"><strong>Step 3:</strong> Create the SASToken and specify the permissions and expiration time for the token. The ExpiryTime is the amount of time before the SASToken expires. You should set this value to a time that will allow you to complete the desired operation.
</span>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkgreen;font-size: 12pt"><em>#new SASToken
</em></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">sasToken<span style="color: #333333"> = <span style="color: blue">New-AzureStorageContainerSASToken<span style="color: #333333"> -container <span style="color: darkblue">$<span style="color: orangered">ContainerName<span style="color: #333333"> -Permission rwdl -ExpiryTime <span style="color: darkblue">(<span style="color: blue">get-date<span style="color: darkblue">)<span style="color: #333333">.AddHours<span style="color: darkblue">(<span style="color: teal">1<span style="color: darkblue">)<span style="color: #333333">
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkgreen;font-size: 12pt"><em>#new storage content using the SAS token we just create
</em></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">StorageContext<span style="color: #333333"> = <span style="color: blue">New-AzureStorageContext<span style="color: #333333"> $<span style="color: orangered">StorageAccountName<span style="color: #333333"> -SasToken <span style="color: darkblue">$<span style="color: orangered">sasToken</span>
</span></span></span></span></span></span></span></span></p>
<p style="margin-left: 36pt"><span style="font-size: 12pt">We now have everything setup to securely upload and download files. The key is the use the $StorageAccount object that we just created. Let's verify in our subscription that our container is created.
</span></p>
<p style="margin-left: 36pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/112617_2009_UploadandDo2.png" /><span style="font-size: 12pt">
</span></p>
<span style="font-size: 12pt"><strong>Step 4:</strong> Let's upload a file to our container as a blob.
</span>
<p style="margin-left: 40pt"><span style="font-size: 12pt"><span style="color: darkgreen"><em>#upload a file</em></span>
</span></p>
<p style="background: #fffffe;margin-left: 40pt"><span style="color: blue;font-size: 12pt">Set-AzureStorageBlobContent<span style="color: #333333"> -File <span style="color: darkblue">$<span style="color: orangered">file<span style="color: #333333"> -Container <span style="color: darkblue">$<span style="color: orangered">containerName<span style="color: #333333"> -Context <span style="color: darkblue">$<span style="color: orangered">StorageContext<span style="color: #333333"> -Blob <span style="color: darkblue">$<span style="color: orangered">blob<span style="color: #333333"> -Force -WarningAction SilentlyContinue
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="margin-left: 40pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/112617_2009_UploadandDo3.png" /><span style="font-size: 12pt">
</span></p>
<p style="margin-left: 40pt"><span style="font-size: 12pt">Now let's verify the file was uploaded to our container.
</span></p>
<p style="margin-left: 40pt"><img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/112617_2009_UploadandDo4.png" /><span style="font-size: 12pt">
</span></p>
<span style="font-size: 12pt"><strong>Step 5:</strong> Now let's download the file to our Azure Iaas VM.
</span>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: darkgreen;font-size: 12pt"><em>#download a file
</em></span></p>
<p style="background: #fffffe;margin-left: 36pt"><span style="color: blue;font-size: 12pt">Get-AzureStorageBlobContent<span style="color: #333333"> -Container <span style="color: darkblue">$<span style="color: orangered">ContainerName<span style="color: #333333"> -Blob <span style="color: darkred">'testfile.txt'<span style="color: #333333"> -Destination <span style="color: darkred">'C:\test\testfile.txt'<span style="color: #333333"> -Context <span style="color: darkblue">$<span style="color: orangered">storageAccountContext<span style="color: #333333"> -Force
</span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="margin-left: 36pt"><span style="font-size: 12pt">The testfile.txt was downloaded to our local IaaS VM. See how easy it is to upload and download a file using a SASToken.
</span></p>
<span style="font-size: 12pt"><strong>PowerShell
</strong></span>
<p style="background: #fffffe"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> = <span style="color: darkred">'LabRG1'<span style="color: #333333">
</span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">StorageAccountName<span style="color: #333333"> = <span style="color: darkred">'labsa1'<span style="color: #333333">
</span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">ContainerName<span style="color: #333333"> = <span style="color: darkred">'labcn1'<span style="color: #333333">
</span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: blue;font-size: 12pt">New-AzureRmResourceGroup<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> -Location <span style="color: darkblue">$<span style="color: orangered">location<span style="color: #333333">
</span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: blue;font-size: 12pt">New-AzureRmStorageAccount<span style="color: #333333"> -ResourceGroupName <span style="color: darkblue">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">StorageAccountName<span style="color: #333333"> -Type Standard_LRS -Location <span style="color: darkred">"East US"<span style="color: #333333">
</span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: blue;font-size: 12pt">Set-AzureRmCurrentStorageAccount<span style="color: #333333"> -ResourceGroupName <span style="color: darkblue">$<span style="color: orangered">ResourceGroupName<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">StorageAccountName<span style="color: #333333">
</span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkgreen;font-size: 12pt"><em># create a container and SASToken</em><span style="color: #333333">
</span></span></p>
<p style="background: #fffffe"><span style="color: blue;font-size: 12pt">New-AzureStorageContainer<span style="color: #333333"> -Name <span style="color: darkblue">$<span style="color: orangered">ContainerName<span style="color: #333333"> -Permission Off
</span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">sasToken<span style="color: #333333"> = <span style="color: blue">New-AzureStorageContainerSASToken<span style="color: #333333"> -container <span style="color: darkblue">$<span style="color: orangered">ContainerName<span style="color: #333333"> -Permission rwdl -ExpiryTime <span style="color: darkblue">(<span style="color: blue">get-date<span style="color: darkblue">)<span style="color: #333333">.AddHours<span style="color: darkblue">(<span style="color: teal">1<span style="color: darkblue">)<span style="color: #333333">
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkblue;font-size: 12pt">$<span style="color: orangered">StorageContext<span style="color: #333333"> = <span style="color: blue">New-AzureStorageContext<span style="color: #333333">
<span style="color: darkblue">$<span style="color: orangered">StorageAccountName<span style="color: #333333"> -SasToken <span style="color: darkblue">$<span style="color: orangered">sasToken<span style="color: #333333">
</span></span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkgreen;font-size: 12pt"><em>#upload a file</em><span style="color: #333333">
</span></span></p>
<p style="background: #fffffe"><span style="color: blue;font-size: 12pt">Set-AzureStorageBlobContent<span style="color: #333333"> -File <span style="color: darkblue">$<span style="color: orangered">file<span style="color: #333333"> -Container <span style="color: darkblue">$<span style="color: orangered">containerName<span style="color: #333333"> -Context <span style="color: darkblue">$<span style="color: orangered">StorageContext<span style="color: #333333"> -Blob <span style="color: darkblue">$<span style="color: orangered">blob<span style="color: #333333"> -Force -WarningAction SilentlyContinue
</span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: darkgreen;font-size: 12pt"><em>#download a file</em><span style="color: #333333">
</span></span></p>
<p style="background: #fffffe"><span style="color: blue;font-size: 12pt">Get-AzureStorageBlobContent<span style="color: #333333"> -Container <span style="color: darkblue">$<span style="color: orangered">ContainerName<span style="color: #333333"> -Blob <span style="color: darkred">'testfile.txt'<span style="color: #333333"> -Destination <span style="color: darkred">'C:\test\testfile.txt'<span style="color: #333333"> -Context <span style="color: darkblue">$<span style="color: orangered">storageAccountContext<span style="color: #333333"> -Force
</span></span></span></span></span></span></span></span></span></span></span></span></p>
<p style="background: #fffffe"><span style="color: #333333;font-family: Consolas;font-size: 10pt">
</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>