&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 August 2017 on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/articles/2017/08/</link><description>Recent content in Articles from August 2017 on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://powershell.org/articles/2017/08/index.xml" rel="self" type="application/rss+xml"/><item><title>PowerShell 2.0 deprecation</title><link>https://powershell.org/articles/2017-08-25-powershell-2-0-deprecation/</link><guid>https://powershell.org/articles/2017-08-25-powershell-2-0-deprecation/</guid><pubDate>Fri, 25 Aug 2017 10:29:17 +0000</pubDate><description>&lt;p&gt;PowerShell 2.0 is being deprecated - see the PowerShell Team &lt;a href="https://blogs.msdn.microsoft.com/powershell/2017/08/24/windows-powershell-2-0-deprecation/"&gt;blog&lt;/a&gt; for full details&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>PowerShell 2.0 is being deprecated - see the PowerShell Team<a href="https://blogs.msdn.microsoft.com/powershell/2017/08/24/windows-powershell-2-0-deprecation/">blog</a> for full details</p>
]]></content:encoded></item><item><title>#PSBlogWeek is Back!</title><link>https://powershell.org/articles/2017-08-23-psblogweek-is-back/</link><guid>https://powershell.org/articles/2017-08-23-psblogweek-is-back/</guid><pubDate>Wed, 23 Aug 2017 17:49:39 +0000</pubDate><description>&lt;p&gt;I&amp;rsquo;ve decided to bring #PSBlogWeek back! Brush off those PowerShell blogs and grease up those typing fingers&amp;hellip;.wait..don&amp;rsquo;t do that but at least stretch a little bit. If you&amp;rsquo;d like to write a great article on PowerShell on your blog to help contribute great content and get yourself some notoriety, #PSBlogWeek is how it&amp;rsquo;s done.&lt;br&gt;
For full details, head over to &lt;a href="http://www.adamtheautomator.com/psblogweek-powershell-blogging-entire-week/"&gt;my blog&lt;/a&gt; where I&amp;rsquo;ve outlined everything or head directly over to &lt;a href="http://www.psblogweek.com"&gt;psblogweek.com&lt;/a&gt; for full details!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I&rsquo;ve decided to bring #PSBlogWeek back! Brush off those PowerShell blogs and grease up those typing fingers&hellip;.wait..don&rsquo;t do that but at least stretch a little bit. If you&rsquo;d like to write a great article on PowerShell on your blog to help contribute great content and get yourself some notoriety, #PSBlogWeek is how it&rsquo;s done.<br>
For full details, head over to<a href="http://www.adamtheautomator.com/psblogweek-powershell-blogging-entire-week/">my blog</a> where I&rsquo;ve outlined everything or head directly over to<a href="http://www.psblogweek.com">psblogweek.com</a> for full details!</p>
]]></content:encoded></item><item><title>Using PowerShell, Azure Automation, and OMS – Part III</title><link>https://powershell.org/articles/2017-08-08-using-powershell-azure-automation-and-oms-part-iii/</link><guid>https://powershell.org/articles/2017-08-08-using-powershell-azure-automation-and-oms-part-iii/</guid><pubDate>Tue, 08 Aug 2017 14:00:43 +0000</pubDate><description>&lt;p&gt;It&amp;rsquo;s been a long road, but we&amp;rsquo;re almost there!  A couple of weeks ago we looked at how we can create an Azure Automation Account and add our own custom modules to the solution to be used in Azure Automation.  Last week, we took a deeper dive into configuring a runbook to take in webhook data from an alert using Microsoft&amp;rsquo;s Operations Management Suite.  Then we looked into the data itself to see how we can leverage it against our runbook to fix problems for us on the fly.&lt;br&gt;
This week, we&amp;rsquo;re going to modify an existing function to use that webhook data directly.&lt;br&gt;
&lt;strong&gt;Building on Webhook Data&lt;/strong&gt;&lt;br&gt;
We could actually build our logic directly into the runbook to parse the webhook data and then pass the formatted information to our function that we&amp;rsquo;ve made available in Azure.  But I prefer to keep my runbooks as simple as possible and do the heavy lifting in my function.  This makes the runbook look a little bit cleaner, and allows me to minimize my code management a little more.  Also, Azure Automation Runbooks, as of this writing, don&amp;rsquo;t play nicely with parameter sets in them, so I might as well pass my data along to a command that does.&lt;br&gt;
Originally, I had built a one-liner that allowed me to create an NSG rule on the fly to block and incoming traffic from a specific IPAddress.  It was a fairly simple command.  But today, we&amp;rsquo;re going to make it a little more robust, and give it the ability to use webhook data.  Here&amp;rsquo;s my original code:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>It&rsquo;s been a long road, but we&rsquo;re almost there!  A couple of weeks ago we looked at how we can create an Azure Automation Account and add our own custom modules to the solution to be used in Azure Automation.  Last week, we took a deeper dive into configuring a runbook to take in webhook data from an alert using Microsoft&rsquo;s Operations Management Suite.  Then we looked into the data itself to see how we can leverage it against our runbook to fix problems for us on the fly.<br>
This week, we&rsquo;re going to modify an existing function to use that webhook data directly.<br><strong>Building on Webhook Data</strong><br>
We could actually build our logic directly into the runbook to parse the webhook data and then pass the formatted information to our function that we&rsquo;ve made available in Azure.  But I prefer to keep my runbooks as simple as possible and do the heavy lifting in my function.  This makes the runbook look a little bit cleaner, and allows me to minimize my code management a little more.  Also, Azure Automation Runbooks, as of this writing, don&rsquo;t play nicely with parameter sets in them, so I might as well pass my data along to a command that does.<br>
Originally, I had built a one-liner that allowed me to create an NSG rule on the fly to block and incoming traffic from a specific IPAddress.  It was a fairly simple command.  But today, we&rsquo;re going to make it a little more robust, and give it the ability to use webhook data.  Here&rsquo;s my original code:</p><p><code>Function Set-AzureRmNSGMaliciousRule { [cmdletbinding()] Param( [Parameter(Mandatory=$true)][string]$ComputerName, [Parameter(Mandatory=$true)][string]$IPAddress ) $ResGroup = (Get-AzureRmResource).where({$PSItem.Name -eq $Sys}) $VM = Get-AzureRmVM -ResourceGroupName $ResGroup.ResourceGroupName -Name $Sys $VmNsg = (Get-AzureRmNetworkSecurityGroup -ResourceGroupName $VM.ResourceGroupName).where({$PSItem.NetworkInterfaces.Id -eq $VM.NetworkProfile.NetworkInterfaces.Id}) $Priority = ($VmNsg.SecurityRules) | Where-Object -Property Priority -LT 200 | Select-Object -Last 1 If ($Priority -eq $null){ $Pri = 100 } Else { $Pri = ($Priority + 1) } $Name = ('BlockedIP_' + $IPAddress) $NSGArgs = @{ Name = $Name Description = ('Malicious traffic from ' + $IPAddress) Protocol = '*' SourcePortRange = '*' DestinationPortRange = '*' SourceAddressPrefix = $IPAddress DestinationAddressPrefix = '*' Access = 'Deny' Direction = 'Inbound' Priority = $Pri } $VmNsg | Add-AzureRmNetworkSecurityRuleConfig @NSGArgs | Set-AzureRmNetworkSecurityGroup }</code>I want to keep my mandatory parameters for my original one-liner solution in-case I need to do something tactically.  So we&rsquo;ll go ahead and split the parameters for on-prem vs. webhook into different parameter sets.  As webhook data is formatted as a JSON object, we&rsquo;ll need to specify the data type for the WebhookData parameter as object.</p><p><code>Param( [Parameter(ParameterSetName='ConsoleInput')][string]$ComputerName, [Parameter(ParameterSetName='ConsoleInput')][string]$MaliciousIP, [Parameter(ParameterSetName='WebhookInput")][object]$WebhookData )</code>Now, we&rsquo;re going to add some logic to parse out the data that we&rsquo;re looking to use:</p><p><code>If($PSCmdlet.ParameterSetName -eq 'WebhookInput'){ $SearchResults = (ConvertFrom-Json $WebhookData.RequestBody).SearchResults.value Write-Output ("Target computer is " + $SearchResults.Computer) Write-Output ("Malicious IP is " + $SearchResults.RemoteIP) $ComputerName = (($SearchResults.Computer).split(' ') | Select-Object -First 1) $MaliciousIP = (($SearchResults.RemoteIP).split(' ') | Select-Object -First 1) } If ($ComputerName -like "*.*"){ $Sys = $ComputerName.Split('.') | Select-Object -First 1 } Else { $Sys = $ComputerName }</code>You&rsquo;ll notice that I&rsquo;m doing some string formatting with our data here.  Webhook data can concatenate multiple alerts together and separate the array by using spaces, so we&rsquo;re splitting that up and grabbing the first entry for each input we need.  The additional splitting on the ComputerName is to accomodate for systems that are domain joined, as Azure isn&rsquo;t necessarily aware of a system&rsquo;s FQDN.  Mind you, this is a rough example, and continuously growing; So as my use cases evolve, so will my code.<br>
Now that we have our data formatted, we can update our module and upload it to our Azure Automation Account using the same process outlined in Part I, but with the -Force parameter added so we can overwrite the existing instance.</p><p><code>Param( [Parameter(Mandatory=$true)] [object]$WebhookData ) $connectionName = "AzureRunAsConnection" try { # Get the connection "AzureRunAsConnection " $servicePrincipalConnection=Get-AutomationConnection -Name $connectionName "Logging in to Azure..." Add-AzureRmAccount</code>
-ServicePrincipal<code>-TenantId $servicePrincipalConnection.TenantId</code>
-ApplicationId $servicePrincipalConnection.ApplicationId<code>-CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint } catch { if (!$servicePrincipalConnection) { $ErrorMessage = "Connection $connectionName not found." throw $ErrorMessage } else{ Write-Error -Message $_.Exception throw $_.Exception } } Set-AzureRmNSGMaliciousRule -WebHookData $WebhookData</code>Now, in a few minutes, our runbook should trigger and we can monitor the result.</p><p><code>$Job = (Get-AzureRmAutomationJob -RunbookName WebhookNSGRule -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName) $Job[0] | Select-Object -Property * ResourceGroupName : mms-eus AutomationAccountName : testautoaccteastus2 JobId : 339601cd-14e9-4002-8fcd-7d2008726445 CreationTime : 7/24/2017 10:11:43 AM -04:00 Status : Completed StatusDetails : StartTime : 7/24/2017 10:12:21 AM -04:00 EndTime : 7/24/2017 10:13:31 AM -04:00 Exception : LastModifiedTime : 7/24/2017 10:13:31 AM -04:00 LastStatusModifiedTime : 1/1/0001 12:00:00 AM +00:00 JobParameters : {} RunbookName : WebhookNSGRule HybridWorker : StartedBy :</code>We can start digging into the outputs of the runbook after completion to gather a little more data.</p><p><code>$Job = (Get-AzureRmAutomationJob -RunbookName WebhookNSGRule -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName) $JobOut = Get-AzureRmAutomationJobOutput -Id $Job[0].JobId -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName ForEach ($JobCheck in $JobOut){ $JobCheck.Summary } PS C:\WINDOWS\system32&gt; ForEach ($JobCheck in $JobOut){ $JobCheck.Summary } Logging in to Azure... Target computer is server1 server1 server1 Malicious IP is 183.129.160.229 183.129.160.229 Target system is server1 Incoming MaliciousIP is 183.129.160.229 Creating rule...</code>And now if I check against my system, we will see that OMS is auto-generating rules for us!</p><p><code>$VM = (Get-AzureRmResource).where({$PSItem.Name -like 'server1'}) $Machine = Get-AzureRmVM -ResourceGroupName $VM[0].ResourceGroupName -Name $VM[0].Name $NSG = (Get-AzureRmNetworkSecurityGroup -ResourceGroupName $Machine.ResourceGroupName).where({$PSItem.NetworkInterfaces.Id -eq $Machine.NetworkProfile.NetworkInterfaces.Id}) (Get-AzureRmNetworkSecurityRuleConfig -NetworkSecurityGroup $NSG[0]).where({$PSItem.Name -like "BlockedIP_*"}) Name : BlockedIP_206.190.36.45 Id : /subscriptions/f2007bbf-f802-4a47-9336-cf7c6b89b378/resourceGroups/test/providers/Microsoft.Network/networkSecurityGroups/server1nsgeus2domain Controller/securityRules/BlockedIP_206.190.36.45 Etag : W/"279e0fee-05c6-43ef-b897-19f927dd9a40" ProvisioningState : Succeeded Description : Auto-Generated rule - OMS detected malicious traffic from 206.190.36.45 Protocol : * SourcePortRange : * DestinationPortRange : * SourceAddressPrefix : 206.190.36.45 DestinationAddressPrefix : * Access : Deny Priority : 100 Direction : Inbound Name : BlockedIP_183.129.160.229 Id : /subscriptions/f2007bbf-f802-4a47-9336-cf7c6b89b378/resourceGroups/test/providers/Microsoft.Network/networkSecurityGroups/server1nsgeus2domain Controller/securityRules/BlockedIP_183.129.160.229 Etag : W/"279e0fee-05c6-43ef-b897-19f927dd9a40" ProvisioningState : Succeeded Description : Auto-Generated rule - OMS detected malicious traffic from 183.129.160.229 Protocol : * SourcePortRange : * DestinationPortRange : * SourceAddressPrefix : 183.129.160.229 DestinationAddressPrefix : * Access : Deny Priority : 101 Direction : Inbound</code>After letting my system go for about 24 hours, my OMS Alert triggered the runbook an additional five times.  Each time generating an additional network security group rule in response to traffic that OMS had recognized as potentially malicious, and thus remediating my problem while I slept.<br><img src="https://powershell.org/wp-content/uploads/2017/07/12-NSG-300x48.jpg" alt=""><br>
Using a monitoring tool that can tightly integrate with your automation tools is a necessity in the age of the Cloud.  I hope you enjoyed this series and find it to be useful!<br><a href="https://powershell.org/2017/07/25/using-powershell-azure-automation-and-oms-part-i/">Part I - Azure Automation Account Creation and Adding Modules</a><br>
Part II - Configuring Azure Automation Runbooks And Understanding Webhook Data<br><strong>Part III - Utilizing Webhook Data in Functions and Validate Results</strong></p>
]]></content:encoded></item><item><title>Summit agenda process</title><link>https://powershell.org/articles/2017-08-08-summit-agenda-process/</link><guid>https://powershell.org/articles/2017-08-08-summit-agenda-process/</guid><pubDate>Tue, 08 Aug 2017 11:31:35 +0000</pubDate><description>&lt;p&gt;There’s been a lot of discussion on the Summit Slack channel around people proposing sessions for the 2018 Summit. I thought an explanation of how we put the agenda together would be useful for anyone thinking about submitting sessions.&lt;/p&gt;
&lt;p&gt;First off though – if you’re thinking about submitting a session for the 2018 Summit then JUST DO IT! We are reserving a number of sessions for new speakers, as we always do. One of our goals for the Summit is to nurture the next generation of speakers. What better way to learn to speak about PowerShell than in front of the world’s greatest PowerShell audience. There is a balancing act between nurturing new speakers and having “big name” established speakers that we know will help draw an audience to the Summit.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>There’s been a lot of discussion on the Summit Slack channel around people proposing sessions for the 2018 Summit. I thought an explanation of how we put the agenda together would be useful for anyone thinking about submitting sessions.</p><p>First off though – if you’re thinking about submitting a session for the 2018 Summit then JUST DO IT! We are reserving a number of sessions for new speakers, as we always do. One of our goals for the Summit is to nurture the next generation of speakers. What better way to learn to speak about PowerShell than in front of the world’s greatest PowerShell audience. There is a balancing act between nurturing new speakers and having “big name” established speakers that we know will help draw an audience to the Summit.</p><p>The call for topics -<a href="https://powershell.org/2017/08/01/76318/">https://powershell.org/2017/08/01/76318/</a></p><ul><li>explains what we’re looking for and the mechanics of submitting a session. This year it’s easier than ever and the site we are using facilitates two-way communication with the potential speaker so that we can help them fine tune their proposal.</li></ul><p>Once you’ve submitted the proposal we get an email containing the title and the text. Within a few days (at most) you’ll start to get feedback even if it’s just a thank you for submitting if there’s nothing we think should be changed. We may start an extended dialog depending on the submission and what we actually need.</p><p>Well before we open the call for topics we’ll have decided the structure of the Summit – the 2018 structure was done immediately after the 2017 Summit! I’m not giving full details at this stage but we’ll have a mixture of standard 45-minute sessions and double length sessions. The exact mix will depend on the sessions that are submitted. That structure tells me how many sessions I need. From that number, I’ll subtract those that the PowerShell team will use and the time we need for the Community Lightning Demos (yes, they are returning in 2018) and any other activities. That gives me the number of sessions I need.</p><p> A second consideration is budget. We’d love to have each session done by a separate speaker but that costs the Summit in terms of free admission, food etc. So, we have a budget which constrains the number of speakers we can sensibly accommodate without making the Summit too expensive for attendees. Again, this is a balancing act between diversity of speakers and the cost to attendees.</p><p>Having determined the number of speakers and the number of sessions required I’ll start thinking about which topics will be of most interest in April 2018. We set the agenda in October 2017 so we’re guessing to a certain degree.  We look for sessions that meet one or more of these criteria:</p><p>·</p><p>A currently hot topic</p><p>·</p><p>A new feature in PowerShell that attendees may not have had the time to investigate</p><p>·</p><p>A topic that is causing a lot of questions on the forums</p><p>·</p><p>A topic that we’ve not seen before</p><p>·</p><p>A new module – as long as the code is explained -  that solves a problem or makes life easier</p><p>·</p><p>A deep dive into an aspect of the PowerShell language or engine</p><p>·</p><p>New techniques for using PowerShell</p><p>·</p><p>Best practices</p><p>·</p><p>DevOps – usually practical based “how I did X”</p><p>·</p><p>What I learned doing “Y” and how that helps you</p><p>·</p><p>How the session fits with other sessions we’re thinking of using</p><p>·</p><p>It’s a positive session. Session proposals that dwell on, and just enumerate, the shot-comings of a particular aspect of PowerShell are extremely unlike to be accepted. If you turn that round and show how to overcome those issues – that’s a positive session.</p><p>·</p><p>Do we think the speaker understands the topic well enough to present an authorative session? This is often base on the abstract of the proposal which is why we say it’s got to get our attention.</p><p>·</p><p>Is it a session that can be presented as the same time as the PowerShell team or other “big name” is speaking so we can balance attendees across the rooms.</p><p>Other criteria may apply depending on circumstances.</p><p>Once, we’ve got a number of sessions available we’ll start to circulate the details amongst the people helping put the agenda together asking for feedback on the session proposals. In some cases, this will become feedback to the proposer and we’ll work with the potential speaker to refine the proposal. This process has started.</p><p>When the call for topics has closed I’ll go through the proposed sessions and create a first pass of the agenda. This first pass is circulated to a small number of people who can comment, suggest alternative sessions, move sessions around and generally rework the agenda as required. When we’re happy we’ll notify the speakers and publish the agenda. If your sessions weren’t accepted we&rsquo;ll let you know.</p><p>Then we keep our fingers crossed that we’ve got it right and people will want to attend the Summit based on the agenda.</p><p>2018 will be our biggest Summit ever so we need more speakers. The information in this – especially the criteria used when thinking about sessions – should help you put together a proposal that will catch our eye.</p><p>If you’re in the slightest doubt about whether to submit sessions – JUST DO IT. If you want to discuss ideas then leave a comment, email me or join the Summit Slack channel #speaking-ideas where you can get feedback from people in a similar situation.</p><p>You are the future of Summit and we need you to submit those proposals.</p><p>Hope to see you (speaking) at the 2018 Summit.</p>
]]></content:encoded></item><item><title>Using PowerShell, Azure Automation, and OMS – Part II</title><link>https://powershell.org/articles/2017-08-01-using-powershell-azure-automation-and-oms-part-ii/</link><guid>https://powershell.org/articles/2017-08-01-using-powershell-azure-automation-and-oms-part-ii/</guid><pubDate>Tue, 01 Aug 2017 14:00:46 +0000</pubDate><description>&lt;p&gt;So last time we learned how to upload our custom modules into Azure Automation so we can start using them in Azure Automation Runbooks.  This week we&amp;rsquo;re going to take a look at configuring a runbook to see what kind of data we can ingest from OMS Webhook data, and how we can leverage that data to pass into our functions.&lt;br&gt;
&lt;strong&gt;Creating the Runbook Script&lt;/strong&gt;&lt;br&gt;
So first off, let&amp;rsquo;s talk about basic runbooks and running them against objects in Azure.  As previously discussed, when your automation account is created, it creates with it an AzureRunAsAccount.  This account is configured to act on behalf of the user that has access to the automation account and the runbooks in order to perform the runbook task.  In order to leverage this account, you need to invoke it in the runbook itself.  You can actually find an example of this snippet in the AzureAutomationTutorialScript runbook in your automation account.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>So last time we learned how to upload our custom modules into Azure Automation so we can start using them in Azure Automation Runbooks.  This week we&rsquo;re going to take a look at configuring a runbook to see what kind of data we can ingest from OMS Webhook data, and how we can leverage that data to pass into our functions.<br><strong>Creating the Runbook Script</strong><br>
So first off, let&rsquo;s talk about basic runbooks and running them against objects in Azure.  As previously discussed, when your automation account is created, it creates with it an AzureRunAsAccount.  This account is configured to act on behalf of the user that has access to the automation account and the runbooks in order to perform the runbook task.  In order to leverage this account, you need to invoke it in the runbook itself.  You can actually find an example of this snippet in the AzureAutomationTutorialScript runbook in your automation account.</p><p><code>$connectionName = "AzureRunAsConnection" try { # Get the connection "AzureRunAsConnection " $servicePrincipalConnection=Get-AutomationConnection -Name $connectionName "Logging in to Azure..." Add-AzureRmAccount</code>
-ServicePrincipal<code>-TenantId $servicePrincipalConnection.TenantId</code>
-ApplicationId $servicePrincipalConnection.ApplicationId<code>-CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint } catch { if (!$servicePrincipalConnection) { $ErrorMessage = "Connection $connectionName not found." throw $ErrorMessage } else{ Write-Error -Message $_.Exception throw $_.Exception } }</code>So now that we&rsquo;ve got our opening snippet, we&rsquo;ll add that into a new .ps1 script file in our preferred integrated scripting environment tool and get to work.<br>
Now, in order to be able to ingest data from an OMS Alert, we need to be able to pass the data to our Azure Automation runbook.  In order to do so, we only need to add a $WebHookData parameter to the runbook and specify the data type as object.</p><p><code>Param ( [Parameters()][object]$WebHookData )</code>Now, we need to convert that data from a JSON object into something readable in our output.  Webhook data is presented with three primary datasets - WebhookName, RequestHeader, and RequestBody.  WebhookName, obviously is the name of the incoming webhook.  RequestHeader is a hash table containing all of the header data for the incoming requestion.  And finally, RequestBody is the body of the incoming request.  This is where the data we want to parse will reside.  Specifically, it will reside under the SearchResults property of the RequestHeader dataset.</p><p><code>$WebhookData.WebhookName $WebhookData.RequestHeader $WebhookData.RequestBody</code>So let&rsquo;s configure our runbook to display the incoming data to examine what we have to play with.</p><p><code>$SearchResults = (ConvertFrom-Json $WebhookData.RequestBody).SearchResults.value $SearchResults</code><strong>Publish the Runbook</strong><br>
Now, we&rsquo;ll go ahead and save our script as a .ps1 file and upload it to our automation account with the Import-AzureRmAutomationRunbook cmdlet.</p><p><code>Import-AzureRmAutomationRunbook -Path 'C:\Scripts\Presentations\OMSAutomation\ExampleRunbookScript.ps1' -Name WebhookNSGRule -Type PowerShell -ResourceGroupName $AutoAcct.ResourceGroupName -AutomationAccountName $AutoAcct.AutomationAccountName -Published</code>And now we can see our return.<br><img src="https://powershell.org/wp-content/uploads/2017/07/7-ImportRunbook-300x150.png" alt=""><br>
And if we check through the UI, we can see a brand-new, shiny runbook sitting in our automation account!  Now, we can configure a basic alert to monitor in OMS.<br><strong>Create an Alert</strong><br>
For the purposes of this example, I&rsquo;ve create a couple of virtual machines with network security group rules for HTTP:80 and RDP:3389 accepting connections from anywhere.  I do not recommend doing this for a production virtual machine.  /endDisclaimer<br>
As you can well expect, these machines are throwing MaliciousIP traffic alerts in Operations Management Suite&rsquo;s console:<br><img src="https://powershell.org/wp-content/uploads/2017/07/8.5-AlertUI-3-300x298.png" alt=""><br>
So if we click on the MaliciousIP flag, it&rsquo;ll take us to the Log Search screen.  This includes the query data that we can use for the alert.  However, you&rsquo;ll want to clean up the query data a bit to generalize it.  In this example, the query is specific to the country that is displayed in the given flag.  But if we remove the country specific portion of the query, it&rsquo;ll allow us to cast a wider net and get data on potentially malicious traffic from any given country.</p><p><code>Canned Query: MaliciousIP=* AND (RemoteIPCountry=* OR MaliciousIPCountry=*) AND (((Type=WireData AND Direction=Outbound) OR (Type=WindowsFirewall AND CommunicationDirection=SEND) OR (Type=CommonSecurityLog AND CommunicationDirection=Outbound)) OR (Type=W3CIISLog OR Type=DnsEvents OR (Type = WireData AND Direction!= Outbound) OR (Type=WindowsFirewall AND CommunicationDirection!=SEND) OR (Type = CommonSecurityLog AND CommunicationDirection!= Outbound))) (RemoteIPCountry="People's Republic of China" OR MaliciousIPCountry="People's Republic of China") Modified Query: MaliciousIP=* AND (RemoteIPCountry=* OR MaliciousIPCountry=*) AND (((Type=WireData AND Direction=Outbound) OR (Type=WindowsFirewall AND CommunicationDirection=SEND) OR (Type=CommonSecurityLog AND CommunicationDirection=Outbound)) OR (Type=W3CIISLog OR Type=DnsEvents OR (Type = WireData AND Direction!= Outbound) OR (Type=WindowsFirewall AND CommunicationDirection!=SEND) OR (Type = CommonSecurityLog AND CommunicationDirection!= Outbound)))</code><img src="https://powershell.org/wp-content/uploads/2017/07/9-ConfigureQuery-1-300x136.jpg" alt=""><br>
After testing our query to make sure it&rsquo;s valid, we can now hit the alert button and configure the alert.  Here you&rsquo;ll need to give it an alert name, a schedule, and number of results before it triggers the alert.  You&rsquo;ll also want to select the Runbook option under actions and select the test runbook we created.  Then we hit save, and wait for our alert to trigger and the runbook to fire.<br><img src="https://powershell.org/wp-content/uploads/2017/07/10-ConfigureAlert-300x193.jpg" alt=""><br>
And as you can see, I didn&rsquo;t have to wait long:<br><img src="https://powershell.org/wp-content/uploads/2017/07/11-RunbookFired-300x240.jpg" alt=""><br><strong>Validate our Data</strong><br>
If we click on one of the completed instances, and navigate to the output blade, we can now see the data we&rsquo;re receiving from our triggered alert.  This particular data shows that inbound traffic from Colombia is attempting an RDP connection to my virtual machine.  With the inbound IP Address and target system name, we now have enough data to be able to create a full-blown auto-remediation solution.</p><p>`Logging in to Azure&hellip;
Environments Context</p><hr><p>{[AzureCloud, AzureCloud], [AzureChinaCloud, AzureChinaCloud], [AzureUSGovernment, AzureUSGovernment]} Microsoft.Azur&hellip;
Computer : server1
MG : 00000000-0000-0000-0000-000000000001
ManagementGroupName : AOI-cb0eefe8-b88f-47ce-ae91-dbc46df99751
SourceSystem : OpsManager
TimeGenerated : 2017-07-21T12:17:37.45Z
SessionStartTime : 2017-07-21T12:16:52Z
SessionEndTime : 2017-07-21T12:16:52Z
LocalIP : 10.119.192.10
LocalSubnet : 10.119.192.0/21
LocalMAC : 00-0d-3a-03-ea-a6
LocalPortNumber : 3389
RemoteIP : 200.35.53.121
RemoteMAC : 12-34-56-78-9a-bc
RemotePortNumber : 4935
SessionID : 10.119.192.10_3389_200.35.53.121_4935_2184_2017-07-21T12:16:52.000Z
SequenceNumber : 0
SessionState : Listen
SentBytes : 20
ReceivedBytes : 40
TotalBytes : 60
ProtocolName : TCP
IPVersion : IPv4
SentPackets : 1
ReceivedPackets : 2
Direction : Inbound
ApplicationProtocol : RDP
ProcessID : 888
ProcessName : C:\Windows\System32\svchost.exe
ApplicationServiceName : ms-wbt-server
LatencyMilliseconds : 116
LatencySamplingTimeStamp : 2017-07-21T12:16:52Z
LatencySamplingFailureRate : 0.0%
MaliciousIP : 200.35.53.121
IndicatorThreatType : Botnet
Confidence : 75
Severity : 2
FirstReportedDateTime : 2017-07-20T20:10:32Z
LastReportedDateTime : 2017-07-21T11:25:11.0661909Z
IsActive : true
ReportReferenceLink :<a href="https://interflowinternal.azure-api.net/api/reports/download/generic/webbot.json">https://interflowinternal.azure-api.net/api/reports/download/generic/webbot.json</a>
RemoteIPLongitude : -75.88
RemoteIPLatitude : 8.77
RemoteIPCountry : Colombia
id : 149270bc-74fc-13d0-34a9-3fd665a457b2
Type : WireData
__metadata : @{Type=WireData; TimeGenerated=2017-07-21T12:17:37.45Z}
`It&rsquo;s a long road, and we&rsquo;re almost there!  Next week, I&rsquo;ll take you through my process of modifying my module to directly ingest webhook data, and how we can take our OMS queries and deploy them to other Operations Management Suite solutions using PowerShell.  See you then!<br><a href="https://powershell.org/2017/07/25/using-powershell-azure-automation-and-oms-part-i/">Part I - Azure Automation Account Creation and Adding Modules</a><br><strong>Part II - Configuring Azure Automation Runbooks And Understanding Webhook Data</strong><br>
Part III - Utilizing Webhook Data in Functions and Validate Results - Coming Soon!</p>
]]></content:encoded></item><item><title>PowerShell and DevOps Global Summit 2018 – Call for Topics</title><link>https://powershell.org/articles/2017-08-01-76318-2/</link><guid>https://powershell.org/articles/2017-08-01-76318-2/</guid><pubDate>Tue, 01 Aug 2017 09:49:30 +0000</pubDate><description>&lt;p&gt;The PowerShell and DevOps Global Summit 2018 will be returning to the Meydenbauer center, Bellevue WA on 9-12 April 2018. PowerShell, and DevOps, experts from all over the world, including PowerShell team members, will once again join together to discuss and learn about maximizing PowerShell in the workplace in fast-paced, knowledge packed presentations. The Summit&amp;rsquo;s also the place to explore and further your knowledge of DevOps principles and practices in a Windows environment, make new connections, learn new techniques, and offer something to your peers and colleagues. If you want to share your PowerShell or DevOps expertise, then this is your official call to submit presentations for selection!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The PowerShell and DevOps Global Summit 2018 will be returning to the Meydenbauer center, Bellevue WA on 9-12 April 2018. PowerShell, and DevOps, experts from all over the world, including PowerShell team members, will once again join together to discuss and learn about maximizing PowerShell in the workplace in fast-paced, knowledge packed presentations. The Summit&rsquo;s also the place to explore and further your knowledge of DevOps principles and practices in a Windows environment, make new connections, learn new techniques, and offer something to your peers and colleagues. If you want to share your PowerShell or DevOps expertise, then this is your official call to submit presentations for selection!</p><h1 id="topic-areas-what-we-are-looking-for" class="ps-heading">Topic Areas:  What we are looking for<a class="ps-heading-anchor" href="#topic-areas-what-we-are-looking-for" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>The bulk of our sessions follow our now traditional 45-minute format. These sessions cover a wide aspect of PowerShell and DevOps expertise. Your proposed session should fit into one of the following areas:</p><ul><li>PowerShell Internals - A deep look into the inside workings of PowerShell and practical solutions that are built from them.</li><li>PowerShell Features Deep Dive - These presentations are a deep look into configuring and working with PowerShell features and capabilities.</li><li>DevOps in Practice - A deep dive into putting the DevOps principles into practice. Presentations should focus on what you&rsquo;re doing and how you&rsquo;re doing it.</li></ul><p>We are open to presentations across the entire ecosystem that has been built around PowerShell or the various DevOps tools. This includes Microsoft platforms and products that have PowerShell-based management tools as well as third party products.  New topics will be preferred over the recycling of older topics. However, we are still open to sessions on &lsquo;older&rsquo; topics that address areas of great confusion or uncertainty.<br>
We have a number agenda slots available for double length sessions. These sessions delve into the depths of a topic covering areas that need more than 45 minutes.</p><h1 id="what-kind-of-sessions-get-selected" class="ps-heading"> What kind of sessions get selected?<a class="ps-heading-anchor" href="#what-kind-of-sessions-get-selected" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>AIM HIGH, VERY HIGH - We&rsquo;re looking for technical sessions that go beyond - way beyond - &lsquo;beginner&rsquo;. This is an &rsquo;experts&rsquo; level conference and we expect the session to reflect that. We want attendees to finish each day with information leaking &hellip; just a little bit &hellip; out their eyeballs. We may accept some intermediate level sessions but please talk to us before spending a lot of time developing such a session.<br>
We look for an abstract that&rsquo;s compelling and makes us want to see your session - so spend time writing a great abstract! We want sessions that offer real-world usability combined with &ldquo;WOW, nobody talks about THAT&rdquo; awesomeness. We want to see the code. Don&rsquo;t just talk about it - this is a PowerShell summit not a PowerPoint Summit. If your session isn&rsquo;t predominately demonstrations its probably not right for the Summit.<br>
Summit presentations are intense and intimate often with plenty of audience interaction. You must expect questions and discussions. This is not a &ldquo;lecture to the audience" event.<br><em>If you have any doubts about the suitability of a particular session, please contact us -</em><a href="mailto:summit@powershell.org"><em>summit@powershell.org</em></a><em>- we&rsquo;re always happy to discuss proposed sessions.</em><br>
Please note all sessions are to be delivered in English. Presenter will provide all equipment needed to deliver session(s), including a laptop or other computer. Presenter must be able to provide video by means of HDMI, DVI-D, or DisplayPort connectors - VGA is NOT supported. Presenter must be able to manually select an appropriate screen resolution for video output. Typically, 1024x768 or 1280x720 are preferred.<br>
Internet connectivity is available in the conference center but bandwidth is limited. If you rely on connecting to the cloud for your sessions then consider recording any demonstrations as a contingency.</p><h1 id="how-to-submit-abstracts-of-presentations" class="ps-heading">How to submit abstracts of presentations<a class="ps-heading-anchor" href="#how-to-submit-abstracts-of-presentations" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>Go to -<a href="https://www.papercall.io/summit2018">https://www.papercall.io/summit2018</a><br>
Click Speak at PowerShell and DevOps Global Summit 2018 (scroll down to find the big green button at bottom right)<br>
Login using Twitter, Facebook or one of the other options.<br>
Complete the form. The name field will show your email address. If you could ensure your full name is in the Bio field this will make communication easier.<br>
Click submit<br>
Please contact summit At PowerShell dot org if you have any issues or problems.</p><h1 id="presentation-submission-deadline-when-you-should-send-it-by" class="ps-heading">Presentation submission deadline: When you should send it by<a class="ps-heading-anchor" href="#presentation-submission-deadline-when-you-should-send-it-by" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>Start submitting your presentation submissions immediately! The selection committee will start selecting presentations as soon as they arrive so you don&rsquo;t want to miss out. The last day we will accept presentation submissions will be<strong>Sunday 1 October 2017</strong>. This is a hard deadline -<strong>NO</strong> sessions will be accepted after this date.</p><h1 id="when-you-will-know-youve-been-selected" class="ps-heading">When you will know you&rsquo;ve been selected<a class="ps-heading-anchor" href="#when-you-will-know-youve-been-selected" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>You will be informed if one or more of your presentations have been selected and notified by Wednesday 11 October 2017. Your notification email will include any further actions you need to take. We will notify all potential speakers by 23 October 2017 if their sessions haven&rsquo;t been accepted.<br>
Speakers, with accepted sessions, will be given free admission to the event, including attendance at all official Summit activities. Speakers may not bring guests to the day sessions or evening events. We have a limited budget, and the number of speakers selected will be governed by that budget.<br>
All speakers will receive a stipend, $400 for a 45-minute session and $800 for a double session, to assist with travelling and accommodation expenses.<br>
The final agenda will be announced and posted on PowerShell.Org on, or about, Wednesday 1 November 2017.<br>
We look forward to your submissions and your help in making PowerShell and DevOps Global Summit 2018 the most valuable IT/Dev conference of the year building on and surpassing the previous Summits!</p>
]]></content:encoded></item><item><title>PowerShell + DevOps Global Summit Scholarship Program</title><link>https://powershell.org/articles/2017-08-01-powershell-devops-global-summit-scholarship-program/</link><guid>https://powershell.org/articles/2017-08-01-powershell-devops-global-summit-scholarship-program/</guid><pubDate>Tue, 01 Aug 2017 00:00:43 +0000</pubDate><description>&lt;p&gt;Automation and scripting has become a major part of IT in recent years.  And PowerShell has played a giant role in the progression of that.  Every year, the wonderful people at PowerShell.org put on the PowerShell + DevOps Global Summit, that always produces outstanding results from amazing speakers and attendees.&lt;/p&gt;
&lt;p&gt;As many of you in IT know, convincing your manager to attend conferences usually depends on a few key factors: Cost and budget, content, and sometimes, experience or seniority in the company.  And unfortunately, that last one may be a deciding factor far too often.  This year, PowerShell.org is making it a priority to help extend, not only the content and knowledge that comes with attending the PowerShell + DevOps Global Summit, but also the experience that comes along with it.  &lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Automation and scripting has become a major part of IT in recent years.  And PowerShell has played a giant role in the progression of that.  Every year, the wonderful people at PowerShell.org put on the PowerShell + DevOps Global Summit, that always produces outstanding results from amazing speakers and attendees.</p><p>As many of you in IT know, convincing your manager to attend conferences usually depends on a few key factors: Cost and budget, content, and sometimes, experience or seniority in the company.  And unfortunately, that last one may be a deciding factor far too often.  This year, PowerShell.org is making it a priority to help extend, not only the content and knowledge that comes with attending the PowerShell + DevOps Global Summit, but also the experience that comes along with it.  </p><p>PowerShell.org is looking for a few driven, over achieving PowerShell-ers, that may still yet be all too 
_
green
_
in their company or role in IT to convince their superiors to send them to the<a href="http://powershellsummit.org">PowerShell + DevOps Global Summit</a>.  To be considered for this scholarship,<strong>we are particularly looking for individuals that would be considered part of a group which is &ldquo;under represented&rdquo; in the IT industry as a whole</strong>, including women, underrepresented minorities, and so on.  So, if you&rsquo;re the IT Director, or the Senior Systems Architect, this opportunity is not for you; however, if you are in those roles, and you know a real go-getter that has shown you some cool stuff they have done with PowerShell, please point them to this opportunity.</p><p>It&rsquo;s also worth noting that this specifically isn&rsquo;t for people in the situation of, &ldquo;yeah, I do this stuff all the time and my employer should totally send me and they totally aren&rsquo;t.&rdquo; We&rsquo;re looking more for, &ldquo;I&rsquo;m working way above my pay grade and this might help give me the jump I need to get to a better place in life.&rdquo; That&rsquo;s the kind of thing you&rsquo;ll have to help us understand about you in your application. This scholarship isn&rsquo;t just to take a burden off your employer or net you a free trip to Redmond; it&rsquo;s to help someone raise themselves in life.</p><h2 id="applying" class="ps-heading">Applying<a class="ps-heading-anchor" href="#applying" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>If you feel you fit the bill for this scholarship, you need to convince us!  We want to hear why you are the Chosen One.  So, if you’d like to be considered for the opportunity you will need to write an essay that demonstrates your passion for PowerShell and automation.  When constructing your essay, please use the following guidelines:</p><ul><li/></ul><p>Demonstrate an intermediate or better understanding of PowerShell,  Scripting, and ToolMaking (If you’ve read Don Jones’ <em>Learn PowerShell in a Month of Lunches</em>, you should be fine).</p><ul><li/></ul><p>Include specifics.  Site specific example on how you have used PowerShell to save your company a bunch of money, or how you’ve done something amazing.</p><ul><li/></ul><p>Include examples.  We DO NOT want a submission that is just a script, but please include some clever snippets that you are proud of.</p><ul><li/></ul><p>Have you shared your work, or made it reusable?  Please include information on how we can find it if you have.  The PowerShell Community is one of the best ones around, and we all love sharing code.</p><ul><li/></ul><p>Be thorough.  We don’t have a hard word count,  but remember, the best essay wins!</p><ul><li>Assure us that, should you be awarded this opportunity, you&rsquo;ve spoken with your employer and getting the time off won&rsquo;t be a problem.</li></ul><h2 id="how-well-decide" class="ps-heading">How We&rsquo;ll Decide<a class="ps-heading-anchor" href="#how-well-decide" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><ul><li/></ul><p>Applications can be submitted<a href="https://docs.google.com/forms/d/e/1FAIpQLScyiEszj9GzVwkNBUOMatlL2kbFwgoRXelWHiaTwlCb8Pkqtg/viewform">HERE</a> (Google account required to apply).</p><ul><li/></ul><p>We will be accepting applications from Friday, September 1st 2017 until Sunday, October 1st 2017.</p><ul><li/></ul><p>The winner(s) will be selected based on the quality of their essay and the enthusiasm it conveys (make us want to keep reading).  Again, we are not looking for the seasoned PowerShell veteran that has been to the Summit the past four years, but the help desk analyst that has been using a collection of tools and scripts they created that is allowing them to be four times as productive.</p><ul><li/></ul><p>The winner(s) will be chosen by a panel of four judges who are all very active members in the PowerShell community.</p><ul><li/></ul><p>The winner(s) will be announced Wednesday, November 1st 2017 on PowerShell.org</p><h2 id="what-awardeesreceive" class="ps-heading">What Awardees Receive<a class="ps-heading-anchor" href="#what-awardeesreceive" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><ul><li/></ul><p>Up to $500 in airfare.</p><ul><li/></ul><p>Four hotel room nights.</p><ul><li/></ul><p>Full admission to the PowerShell + DevOps Global Summit.</p>
]]></content:encoded></item></channel></rss>