&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Articles from July 2017 on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/articles/2017/07/</link><description>Recent content in Articles from July 2017 on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://powershell.org/articles/2017/07/index.xml" rel="self" type="application/rss+xml"/><item><title>Using PowerShell, Azure Automation, and OMS – Part I</title><link>https://powershell.org/articles/2017-07-25-using-powershell-azure-automation-and-oms-part-i/</link><guid>https://powershell.org/articles/2017-07-25-using-powershell-azure-automation-and-oms-part-i/</guid><pubDate>Tue, 25 Jul 2017 14:00:01 +0000</pubDate><description>&lt;p&gt;Microsoft&amp;rsquo;s Operations Management Suite provides some exceptional tools for monitoring and maintaining your environments in both the cloud and in your datacenter.  One of it&amp;rsquo;s best features, however, is its ability to leverage the tools that you&amp;rsquo;ve already developed to perform tasks and remediate issues using PowerShell, Azure Automation Runbooks, and OMS Alert triggers.  In this series, we&amp;rsquo;ll be discussing how you can configure these tools to take care of problems in your own environment.  Today, we&amp;rsquo;ll be talking about how you can take your own PowerShell Modules and upload them to Azure Automation.&lt;br&gt;
&lt;strong&gt;Creating The Azure Automation Account&lt;/strong&gt;&lt;br&gt;
In order to create the Azure Automation Account, you&amp;rsquo;ll need to have create the automation account object in the target resource group, and the ability to create an AzureRunAs account in AzureAD.  It&amp;rsquo;s also important to be mindful that not every Azure region has the Microsoft.Automation resource provider registered to it, so you&amp;rsquo;ll want the resource group to exist in the appropriate locale.  You can check this with the Get-AzureRmResourceProvider cmdlet:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Microsoft&rsquo;s Operations Management Suite provides some exceptional tools for monitoring and maintaining your environments in both the cloud and in your datacenter.  One of it&rsquo;s best features, however, is its ability to leverage the tools that you&rsquo;ve already developed to perform tasks and remediate issues using PowerShell, Azure Automation Runbooks, and OMS Alert triggers.  In this series, we&rsquo;ll be discussing how you can configure these tools to take care of problems in your own environment.  Today, we&rsquo;ll be talking about how you can take your own PowerShell Modules and upload them to Azure Automation.<br><strong>Creating The Azure Automation Account</strong><br>
In order to create the Azure Automation Account, you&rsquo;ll need to have create the automation account object in the target resource group, and the ability to create an AzureRunAs account in AzureAD.  It&rsquo;s also important to be mindful that not every Azure region has the Microsoft.Automation resource provider registered to it, so you&rsquo;ll want the resource group to exist in the appropriate locale.  You can check this with the Get-AzureRmResourceProvider cmdlet:</p><p><code>Get-AzureRmResourceProvider -ProviderNamespace 'Microsoft.Automation'</code><img src="https://powershell.org/wp-content/uploads/2017/07/1-AutomationLocation-300x158.png" alt=""><br>
For our purposes, we&rsquo;ll be deploying a resource group to East US 2.  Once the resource group has been created, we&rsquo;ll use New-AzureRmAutomationAccount</p><p><code>$BaseName = 'testautoacct' $Location = 'eastus2' $ResGrp = New-AzureRmResourceGroup -Name $BaseName -Location $Location -Verbose $AutoAcct = New-AzureRmAutomationAccount -ResourceGroupName $ResGrp.ResourceGroupName -Name ($BaseName + $Location) -Location $ResGrp.Location</code>It&rsquo;s good to note that while -Verbose is available for New-AzureRmAutomationAccount, it will not return any verbose output.<br><img src="https://powershell.org/wp-content/uploads/2017/07/2-CreateAccount-300x63.png" alt=""><br><strong>Creating A Blob Container in AzureRM</strong><br>
Now that we have our automation account created, we can begin uploading our modules to be available for Azure Automation to use.  In order to do so, we&rsquo;ll need to create a blob store that we can upload our modules to so that the Azure Automation Account can import them; unlike in the Azure UI, you cannot currently upload your modules directly from your local machine, so you&rsquo;ll need to supply a URI for Azure Automation to access.<br>
Another &lsquo;gotcha&rsquo; is that there is no AzureRm cmdlet for creating a blob container, or for uploading content to that container, so you&rsquo;ll need to do so using the Azure storage commands and passing the Storage Context Key from AzureRM to Azure.  Here is how you can create the storage account, get the storage account key, create a context, and pass it to Azure:</p><p><code>$Stor = New-AzureRmStorageAccount -ResourceGroupName $ResGrp.ResourceGroupName -Name modulestor -SkuName Standard_LRS -Location $ResGrp.Location -Kind BlobStorage -AccessTier Hot Add-AzureAccount $Subscription = ((Get-AzureSubscription).where({$PSItem.SubscriptionName -eq 'LastWordInNerd'})) Select-AzureSubscription -SubscriptionName $Subscription.SubscriptionName -Current $StorKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $Stor.ResourceGroupName -Name $Stor.StorageAccountName).where({$PSItem.KeyName -eq 'key1'}) $StorContext = New-AzureStorageContext -StorageAccountName $Stor.StorageAccountName -StorageAccountKey $StorKey.Value</code>Once we&rsquo;ve run our storage commands, you&rsquo;ll have captured the storage context object like so:<br><img src="https://powershell.org/wp-content/uploads/2017/07/3-StorageContext-300x105.png" alt=""><br>
Now that we&rsquo;ve got access to our AzureRm storage account in Azure, we can now create our blob container:</p><p><code>$Container = New-AzureStorageContainer -Name 'modules' -Permission Blob -Context $StorContext -Permission Blob</code><img src="https://powershell.org/wp-content/uploads/2017/07/4-BlobContainer-300x86.png" alt=""><br>
*NOTE* - I have my container permission set to Blob, which makes this directory publicly available.  At some time in the near future, I&rsquo;ll walk you through how you can use SAS Tokens to access secure blobs at runtime.  Just be mindful of this if you use this code in production.<br><strong>Upload to a Blob Container</strong><br>
Now we can finally upload our modules to the blob store, and register them in Azure Automation!  What we&rsquo;re going to do here is take our custom module, compress it into a .zip file, and then use the Set-AzureStorageBlobContent cmdlet to ship it up to our blob store.  Once the content is shipped, we use the $Blob.ICloudBlob.Uri.AbsoluteUri to feed the New-AzureRmAutomationModule the URI required for the ContentLink parameter.</p><p><code>$ModuleLoc = 'C:\Scripts\Presentations\OMSAutomation\Modules\' $Modules = Get-ChildItem -Directory -Path $ModuleLoc ForEach ($Mod in $Modules){ Compress-Archive -Path $Mod.PSPath -DestinationPath ($ModuleLoc + '\' + $Mod.Name + '.zip') -Force } $ModuleArchive = Get-ChildItem -Path $ModuleLoc -Filter "*.zip" ForEach ($Mod in $ModuleArchive){ $Blob = Set-AzureStorageBlobContent -Context $StorContext -Container $Container.Name -File $Mod.FullName -Force -Verbose New-AzureRmAutomationModule -ResourceGroupName $ResGrp.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName -Name ($Mod.Name).Replace('.zip','') -ContentLink $Blob.ICloudBlob.Uri.AbsoluteUri }</code><img src="https://powershell.org/wp-content/uploads/2017/07/5-UploadModule-300x65.png" alt=""><br>
Now that we&rsquo;ve done all that, we can validate that we have our module in Azure Automation through the UI:<br><img src="https://powershell.org/wp-content/uploads/2017/07/6-Validate-300x282.png" alt=""><br>
Now that we&rsquo;ve uploaded our modules into Azure Automation, we can start using them to perform tasks in Azure.  Next week, we&rsquo;ll look at how we&rsquo;ll be getting more familiar with configuring runbooks and take a closer look at the input data that OMS can pass along to them.<br><strong>Part I - Azure Automation Account Creation and Adding Modules</strong><br><a href="https://powershell.org/2017/08/01/using-powershell-azure-automation-and-oms-part-ii/">Part II - Configuring Azure Automation Runbooks And Understanding Webhook Data</a><br>
Part III - Utilizing Webhook Data in Functions and Validate Results - Coming Soon!</p>
]]></content:encoded></item><item><title>Topics for PowerShell Summit 2018</title><link>https://powershell.org/articles/2017-07-03-topics-for-powershell-summit-2018/</link><guid>https://powershell.org/articles/2017-07-03-topics-for-powershell-summit-2018/</guid><pubDate>Mon, 03 Jul 2017 18:54:52 +0000</pubDate><description>&lt;p&gt;The planning for Summit 2018 has started – to be honest it started before Summit 2017 opened. We’ve reached the stage where we need to start thinking about the broad topics for PowerShell Summit 2018.&lt;br&gt;
What do you want to hear about? Not the session titles, content and speakers but the broad areas of content you want us to include. We can’t actually promise to cover everything requested because we’re dependent on whats submitted when we open our call for topics towards the end of the month.&lt;br&gt;
Looking at the agenda for Summit 2017 we had these very broad groups&lt;br&gt;
PowerShell tool making&lt;br&gt;
DSC and DSC resources&lt;br&gt;
PowerShell Github repository&lt;br&gt;
PowerShell v6&lt;br&gt;
Remoting&lt;br&gt;
Testing - Pester&lt;br&gt;
Azure&lt;br&gt;
PowerShell Functions&lt;br&gt;
JEA&lt;br&gt;
PowerShell v6&lt;br&gt;
PowerShell on Linux&lt;br&gt;
PowerShell modules&lt;br&gt;
Regular Expessions&lt;br&gt;
MSDeploy&lt;br&gt;
PKI&lt;br&gt;
Powershell Jobs, Workflows and runspaces&lt;br&gt;
Nano server&lt;br&gt;
PowerShell cmdlets - compiled and script&lt;br&gt;
Are there any we should drop? Is there a topic we should include – this far out we can commission a specific expert speaker to cover a topic if required. This is your opportunity to help shape Summit 2018. Let us know what you think&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The planning for Summit 2018 has started – to be honest it started before Summit 2017 opened. We’ve reached the stage where we need to start thinking about the broad topics for PowerShell Summit 2018.<br>
What do you want to hear about? Not the session titles, content and speakers but the broad areas of content you want us to include. We can’t actually promise to cover everything requested because we’re dependent on whats submitted when we open our call for topics towards the end of the month.<br>
Looking at the agenda for Summit 2017 we had these very broad groups<br>
PowerShell tool making<br>
DSC and DSC resources<br>
PowerShell Github repository<br>
PowerShell v6<br>
Remoting<br>
Testing - Pester<br>
Azure<br>
PowerShell Functions<br>
JEA<br>
PowerShell v6<br>
PowerShell on Linux<br>
PowerShell modules<br>
Regular Expessions<br>
MSDeploy<br>
PKI<br>
Powershell Jobs, Workflows and runspaces<br>
Nano server<br>
PowerShell cmdlets - compiled and script<br>
Are there any we should drop? Is there a topic we should include – this far out we can commission a specific expert speaker to cover a topic if required. This is your opportunity to help shape Summit 2018. Let us know what you think</p>
]]></content:encoded></item></channel></rss>