&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 2019 on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/articles/2019/</link><description>Recent content in Articles from 2019 on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://powershell.org/articles/2019/index.xml" rel="self" type="application/rss+xml"/><item><title>ICYMI: PowerShell Week of 28-December-2019</title><link>https://powershell.org/articles/2019-12-27-icymi-powershell-week-of-28-december-2019/</link><guid>https://powershell.org/articles/2019-12-27-icymi-powershell-week-of-28-december-2019/</guid><pubDate>Fri, 27 Dec 2019 18:06:33 +0000</pubDate><description>&lt;p&gt;Topics include: Automating Excel, Customizing your profile, a New Year&amp;rsquo;s module and more&amp;hellip;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include: Automating Excel, Customizing your profile, a New Year&rsquo;s module and more&hellip;</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, Kiran Patnayakuni and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://jdhitsolutions.com/blog/powershell/7112/testing-for-powershell-in-windows-terminal/"><em>Testing for PowerShell in Windows Terminal</em></a></p><p>by Jeff Hicks on 20th December</p><p>How do you know if a script is running inside Windows Terminal, Jeff shows you a few ways.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/powershell-excel-tutorial/"><em>PowerShell and Excel: Yes, They Work Together</em></a></p><p>by Adam Bertram on 22nd December</p><p>Microsoft Excel is one of those ubiquitous tools most of us can&rsquo;t escape even if we tried. Many IT professionals use Excel as a little database storing tons of data in various automation routines. What&rsquo;s the best scenario of automation and Excel? PowerShell!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://evotec.xyz/sending-to-microsoft-teams-from-powershell-just-got-easier-and-better/"><em>Sending to Microsoft Teams from PowerShell just got easier and better</em></a></p><p>by Przemyslaw Klys on 22nd December</p><p>Christmas time is upon us, and I&rsquo;ve decided that my PSTeams module needs some love. I wrote it in late 2018 and updated it a few times at the beginning of 2019. This release hopefully is worth of having 1.0 version number.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.thelazyadministrator.com/2019/12/23/homeland-securitys-trusted-travelers-api-and-powershell-getting-a-better-global-entry-interview-using-powershell/"><em>HOMELAND SECURITY’S TRUSTED TRAVELERS API AND POWERSHELL – GETTING A BETTER GLOBAL ENTRY INTERVIEW USING POWERSHELL</em></a></p><p>by Brad Wyatt on 23rd December</p><p>Using the API for Global Entry/Pre-Check you can find out when you can schedule your interview.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.sconstantinou.com/powershell-profiles/"><em>PowerShell Profiles</em></a></p><p>by Stephanos Constantinou on 24th December</p><p>In this tutorial we will see about PowerShell Profiles and their use. PowerShell profiles help you to customize your environment and add elements for every PowerShell session that you start.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/eftv7p/gethappynewyear_yes_bored_at_work/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>u/Bugibugi shares a function that tells you how much longer til the New Year.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/JeffHicks/status/1209992722263625728?s=09"><em>Tweet of the Week</em></a></p><p>Never assume that any PowerShell code you find online is production ready.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=L5Ad4lWdbSo"><em>Youtube: Access Windows 10 With Empire Framework via Powershell</em></a></p><p>The video is a step by step guide on how to use Empire Framework to gain access to a Windows 10 machine via PowerShell.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 20-December-2019</title><link>https://powershell.org/articles/2019-12-20-icymi-powershell-week-of-20-december-2019/</link><guid>https://powershell.org/articles/2019-12-20-icymi-powershell-week-of-20-december-2019/</guid><pubDate>Fri, 20 Dec 2019 16:09:01 +0000</pubDate><description>&lt;p&gt;Topics include New PowerShell in the old ISE, Azure DevOps, Automating Twitter, and Searching Bing with PowerShell to creat a Word Cloud.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include New PowerShell in the old ISE, Azure DevOps, Automating Twitter, and Searching Bing with PowerShell to creat a Word Cloud.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://ironmansoftware.com/using-powershell-core-6-and-7-in-the-windows-powershell-ise/"><em>Using PowerShell Core 6 and 7 in the Windows PowerShell ISE</em></a></p><p>by Adam Driscoll on 15th December</p><p>You probably should be using VSCode, but if you&rsquo;re not heres a great post on using PowerShell Core 6 and PowerShell 7 in PowerShell ISE.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://toastit.dev/2019/12/15/azure-devops-for-powershell-azureadventcalendar-2019-day-15/"><em>Azure Devops for PowerShell</em></a></p><p>by Josh King on 15th December</p><p>This is a great step by step of using Azure DevOps to manage and test your PowerShell code.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/follow-twitter-users/"><em>How to Automate Following Interesting Twitter Users</em></a></p><p>by Adam Bertram on 17th December</p><p>Adam shows you how to use the PSTwitterAPI module to scour twitter and find some interesting people to follow.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://ridicurious.com/2019/12/18/powershell-web-search-and-generating-world-cloud-from-results/"><em>PowerShell Web Search and Generating Word Cloud from Results</em></a></p><p>by Prateek Singh on 18th December</p><p>This is a quick fun blog post to demonstrate how to perform a programmatical web search (A Bing search! 😎) and create a word cloud using the preview snippets</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.kicka5h.io/post/automatically-forward-all-company-meetings-to-new-hire-calendars-using-graph-api"><em>Automatically Forward All-Company Meetings to New Hire Calendars Using Graph API</em></a></p><p>by Ash K. on 19th December</p><p>How many times are all company meetings not given to new starters? Well no more using the Graph API.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/ebalj7/some_powershell_spotted_on_tonights_episode_of_mr/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>When someone finds some PowerShell in an episode of Mr. Robot it becomes the top post of the week.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=wz19NEIakn4"><em>Youtube: PSS: Why you Should be Using PSReadline Every Day with Jeffery Hayes</em></a></p><p>Jeffery goes into detail about the PSReadline Module. PSReadline is a improvement to the command line interface, providing colored syntax, history, and much more. Learn how to make PSReadline a powerful tool in your PowerShell arsenal.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 13-December-2019</title><link>https://powershell.org/articles/2019-12-13-icymi-powershell-week-of-13-december-2019/</link><guid>https://powershell.org/articles/2019-12-13-icymi-powershell-week-of-13-december-2019/</guid><pubDate>Fri, 13 Dec 2019 15:00:42 +0000</pubDate><description>&lt;p&gt;Topics include Functions, String, Certificate Management and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Functions, String, Certificate Management and more.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://dev.to/devblackops/9-tips-for-writing-better-powershell-functions-4ai6"><em>9 Tips for Writing Better PowerShell Functions</em></a></p><p>by Brandon Olin on 7th December</p><p>PowerShell has a lot of functionality tucked away into functions that sometimes are not known, ignored, or forgotten about entirely. Let&rsquo;s talk about some basic things we can add to functions that improve our scripts and ultimately make us better tool makers.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://donjones.com/2019/12/10/the-happy-fate-of-the-dsc-book/"><em>The (Happy) Fate of &ldquo;The DSC Book&rdquo;</em></a></p><p>by Don Jones on 10th December</p><p>An announcement about the fate of &ldquo;The DSC Book&rdquo;.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/windows-certificate-manager/"><em>Finally Making Sense of How Windows Manages Certificates</em></a></p><p>by Michael Soule on 11th December</p><p>Get up to speed on how Windows manages certificates both in the GUI and PowerShell in this deep dive article.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://kpatnayakuni.com/2019/12/12/string-operations-in-powershell/"><em>String Operations in PowerShell</em></a></p><p>by Kiran Patnayakuni on 12th December</p><p>A deep dive into all things strings in PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="http://jdhitsolutions.com/blog/powershell/7081/managing-my-powershell-backup-files/"><em>Managing My PowerShell Backup Files</em></a></p><p>by Jeff Hicks on 12th December</p><p>I&rsquo;ve been backing up files with PowerShell. Now I need a way to trim old backup files automatically. This is how I do it with Group-Object and regular expressions.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/e9q5la/the_kemp_powershell_module_is_now_available/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Announcement from Kemp about their module being available on the PowerShell Gallery.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/adamdriscoll/status/1204234854394556416"><em>Tweet of the Week</em></a></p><p>Universal Dashboard is on the adopters page for PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=EcASUAi1B0k&amp;feature=emb_logo"><em>Youtube: Core Concept: Regex for N00bs with Thomas Rayner</em></a></p><p>REGEX!!! It&rsquo;s often misunderstood and hated by many! But the truth is regex is super powerful and sometimes it&rsquo;s the best tool for the job!</p>]]></content:encoded></item><item><title>“The DSC Book” now Open Source!</title><link>https://powershell.org/articles/2019-12-10-the-dsc-book-now-open-source/</link><guid>https://powershell.org/articles/2019-12-10-the-dsc-book-now-open-source/</guid><pubDate>Tue, 10 Dec 2019 21:20:36 +0000</pubDate><description>&lt;p&gt;“The DSC Book” is now open source! It remains available at Leanpub, but the source is now at &lt;a href="https://github.com/dsccommunity/TheDSCBook"&gt;https://github.com/dsccommunity/TheDSCBook&lt;/a&gt;. Everyone is invited to contribute corrections and expansions, and the results will publish roughly monthly on Leanpub. In addition, the book is now $0 on Leanpub, although you may choose to pay whatever you like, with all proceeds going to The DevOps Collective’s scholarship programs.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>“The DSC Book” is now open source! It remains available at Leanpub, but the source is now at<a href="https://github.com/dsccommunity/TheDSCBook">https://github.com/dsccommunity/TheDSCBook</a>. Everyone is invited to contribute corrections and expansions, and the results will publish roughly monthly on Leanpub. In addition, the book is now $0 on Leanpub, although you may choose to pay whatever you like, with all proceeds going to The DevOps Collective’s scholarship programs.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 06-December-2019</title><link>https://powershell.org/articles/2019-12-06-icymi-powershell-week-of-06-december-2019/</link><guid>https://powershell.org/articles/2019-12-06-icymi-powershell-week-of-06-december-2019/</guid><pubDate>Fri, 06 Dec 2019 16:07:38 +0000</pubDate><description>&lt;p&gt;Topics include Hyper-V, IIS, Ternary Operators and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Hyper-V, IIS, Ternary Operators and more.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="getting-started-with-powershell-the-first-five-commands-you-need-to-master" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#getting-started-with-powershell-the-first-five-commands-you-need-to-master"/><a href="https://www.networkadm.in/the-first-five-commands-you-need-to-master/"><em>GETTING STARTED WITH POWERSHELL: THE FIRST FIVE COMMANDS YOU NEED TO MASTER</em></a><a class="ps-heading-anchor" href="#getting-started-with-powershell-the-first-five-commands-you-need-to-master" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mike Kanakos on December 04, 2019<br>
Getting started with PowerShell is easy. In fact, it’s easy enough for some people that they just dive in and start using it every day with little formal knowledge. At some point though, everyone needs a little help. The PowerShell console has a rich set of cmdlets and built-in help that can be useful for learning how to use the PowerShell language correctly.</p><h6 id="building-a-hyper-v-report-using-ad-and-pswritehtml" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#building-a-hyper-v-report-using-ad-and-pswritehtml"/><a href="http://www.checkyourlogs.net/?p=71683"><em>BUILDING A HYPER-V REPORT USING AD AND PSWRITEHTML</em></a><a class="ps-heading-anchor" href="#building-a-hyper-v-report-using-ad-and-pswritehtml" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Dave Kawula on December 05, 2019<br>
Display Hyper-V VM details as html using Out-GridViewHTML cmdlet in PSWriteHTML module which has built-in buttons to export as CSV,Excel and PDF.</p><h6 id="how-to-manage-iis-websites-in-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#how-to-manage-iis-websites-in-powershell"/><a href="https://adamtheautomator.com/powershell-script-to-create-iis-website/"><em>How To Manage IIS Websites In PowerShell</em></a><a class="ps-heading-anchor" href="#how-to-manage-iis-websites-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Bill kindle on December 03, 2019<br>
If you manage Windows Servers, you&rsquo;ve likely worked with Internet Information Services (IIS). Websites are one of IIS&rsquo;s main features and, using PowerShell, you can easily manage and automate IIS websites with ease!</p><h6 id="powershell-7-ternary-operator" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#powershell-7-ternary-operator"/><a href="https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/powershell-7-ternary-operator"><em>PowerShell 7 Ternary Operator</em></a><a class="ps-heading-anchor" href="#powershell-7-ternary-operator" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by PowerTip on December 04, 2019<br>
With PowerShell 7, the language gets a new operator that created a lot of debate. Basically, you don’t have to use it, but users with a developer background will welcome it.</p><h6 id="detecting-key-presses" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#detecting-key-presses"/><a href="https://powershell.one/tricks/input-devices/detect-key-press"><em>Detecting Key Presses</em></a><a class="ps-heading-anchor" href="#detecting-key-presses" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Tobias Weltner on December 01, 2019<br>
Wouldn’t it be nice for scripts to detect when a key is pressed? Pressing a key could add a pause to scripts, exit loops prematurely, or skip loading things in your profile script.</p><h6 id="reddit-rpowershell---most-popular-weekly-post" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#reddit-rpowershell---most-popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/e60rrf/catesta_a_powershell_module_project_generator/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Catesta is a PowerShell module that can scaffold a PowerShell project with easy integration into several CI/CD options.</p><h6 id="tweet-of-the-week" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#tweet-of-the-week"/><a href="https://twitter.com/Steve_MSFT/status/1202293097293434880"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>If you are contributing to #PowerShell on GitHub or using the daily builds, the master branch is now 7.1 preview.1. We triage and take specific merged PRs into rc.1 branch. Expectation is that 7.1 preview.1 will ship in Jan along with 7.0 GA.</p><h6 id="youtube-how-to-export-dhcp-reservation-via-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20191206.md#youtube-how-to-export-dhcp-reservation-via-powershell"/><a href="https://www.youtube.com/watch?v=nqki1jFF0hg&amp;feature=emb_logo"><em>Youtube: How to export dhcp reservation via powershell</em></a><a class="ps-heading-anchor" href="#youtube-how-to-export-dhcp-reservation-via-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Exporting IP reservations in DHCP using PowerShell.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 29-November-2019</title><link>https://powershell.org/articles/2019-11-29-icymi-powershell-week-of-29-november-2019/</link><guid>https://powershell.org/articles/2019-11-29-icymi-powershell-week-of-29-november-2019/</guid><pubDate>Fri, 29 Nov 2019 16:15:02 +0000</pubDate><description>&lt;p&gt;Topics include Invoke-Command, Objects, Introspection and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Invoke-Command, Objects, Introspection and more.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://flxsql.com/monday-morning-module-maintenance-monoliners/"><em>Monday Morning Module Maintenance Monoliners</em></a></p><p>by Andy Levy on 25th November</p><p>Do enough work with PowerShell and you’ll build up a decent collection of modules installed from the gallery into either your computer or your user profile (or maybe both!). Here are two one-liners to help keep things up to date and tidy.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://ucstatus.com/2019/11/25/skypeonlineconnector-session-reconnection/"><em>SkypeOnlineConnector Session Reconnection</em></a></p><p>by Randy Chapman on 25th November</p><p>If you use the SkypeOnlineConnector PowerShell module to connect to and manage Skype for Business Online or Microsoft Teams, I have some exciting news.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://winsysblog.com/2019/11/using-invoke-command-in-powershell.html"><em>Using Invoke-Command In PowerShell</em></a></p><p>by Dan Franciscus on 26th November</p><p>In this article, Dan Franciscus covers how to use the Invoke-Command and why it is one of his favorite commands to use in PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://office365itpros.com/2019/11/28/why-do-we-write-powershell-like-we-do/"><em>Why Do We Write PowerShell (for Office 365) Like We Do?</em></a></p><p>by Tony Redmond on 28th November</p><p>A reader asked why the PowerShell examples in the book (and this site) are “just code.” It’s a reasonable question that deserves a reasonable answer.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/powershell-objects/"><em>Back to Basics: Understanding PowerShell Objects</em></a></p><p>by Bill Kindle on 29th November</p><p>PowerShell is a powerful language. But what makes it so powerful? PowerShell objects. What are these magical objects and how does PowerShell work with them? Stay tuned to find out.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://youtu.be/LbGNQVbb_VI"><em>Youtube: Azure PowerShell Introduction</em></a></p><p>Learn the basics of using PowerShell with Azure, great primer.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 22-November-2019</title><link>https://powershell.org/articles/2019-11-22-icymi-powershell-week-of-22-november-2019/</link><guid>https://powershell.org/articles/2019-11-22-icymi-powershell-week-of-22-november-2019/</guid><pubDate>Fri, 22 Nov 2019 15:10:16 +0000</pubDate><description>&lt;p&gt;Topics include Group-Object, Power Platform, Preview 6 and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Group-Object, Power Platform, Preview 6 and more.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://powershell.one/tricks/performance/group-object"><em>Speeding Up Group-Object</em></a></p><p>by Tobias Weltner on 17th November</p><p>There is a design flaw in Group-Object. With a workaround, your scripts can be up tp 50x faster and still 2x faster on PowerShell Core.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/safely-using-wmi-in-powershell-part-2"><em>Safely Using WMI in PowerShell (Part 2)</em></a></p><p>by Prateik Singh on 18th November</p><p>In this mini-series, we are looking at the differences between Get-WmiObject and Get-CimInstance. Future PowerShell versions no longer support Get-WmiObject, so it is time to switch to Get-CimInstance if you haven’t already.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/powershell-passion/"><em>PowerShell: The Software that Changed My Life</em></a></p><p>by Adam Bertram on 19th November</p><p>In this personal blog post, learn how one technology managed to change the entire trajectory of a sysadmin.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://blog.admindroid.com/block-self-service-purchase-for-power-platform-products-using-powershell/"><em>How to Block Self-Service Purchase for Power Platform Products Using PowerShell</em></a></p><p>by the AdminDroid team on 19th November</p><p>Recently Microsoft announced Self-service purchase capabilities for Power Platform products (Power BI, PowerApps, and Flow).</p><p>Self-service purchase capability arrives automatically and enabled by default. Due to this change, individuals within the organization can buy subscriptions directly without contacting their IT department.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://devblogs.microsoft.com/powershell/powershell-7-preview-6/"><em>PowerShell 7 Preview 6</em></a></p><p>by Steve Lee on 21st November</p><p>Today we shipped PowerShell 7 Preview.6! This release contains a number of new features and many bug fixes from both the community as well as the PowerShell team. This will be the last preview release as we head towards a Release Candidate in December.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/dxvkau/employee_deleted_60000_files_from_company/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Employee deleted 60,000 files from company sharepoint</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/jessitron/status/1196861737196277761"><em>Tweet of the Week</em></a></p><p>@Jessitron shows you how to create your own custom Prompt in PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=RTTw4OFR8QM&amp;feature=youtu.be"><em>Youtube: PowerShell Ping Buddy - Part 1</em></a></p><p>A video by Adam Driscoll showing off ping buddy a simple grid display for ping results.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 15-November-2019</title><link>https://powershell.org/articles/2019-11-15-icymi-powershell-week-of-15-november-2019/</link><guid>https://powershell.org/articles/2019-11-15-icymi-powershell-week-of-15-november-2019/</guid><pubDate>Fri, 15 Nov 2019 15:09:43 +0000</pubDate><description>&lt;p&gt;Topics include string manipulation, bash, Python and Slack applications.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include string manipulation, bash, Python and Slack applications.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://powershell.one/tricks/performance/strings"><em>Speeding Up String Manipulation</em></a></p><p>by Tobias Weltner on 10th November</p><p>Appending text to strings using “+=” is convenient but slow. Learn how to do string manipulation without slowing down PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.cyberdrain.com/monitoring-with-powershell-monitoring-active-directory-replication/"><em>Monitoring with PowerShell: Monitoring Active Directory replication</em></a></p><p>by Kelvin Tegelaar on 11th November</p><p>To make sure that the domain controllers keep replicating correctly and we detect issues early we use the Active Directory cmdlets in combination with our RMM system. This makes it so we can monitor the current status of the replication and alert if it does not work for a longer period of time.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://threadreaderapp.com/thread/1194296021297352705.html"><em>I sat down to learn enough PowerShell to recreate one of my bash functions.</em></a></p><p>by Jessica Joy Kerr on 12th November</p><p>As a user of Linux and Bash Jessica details the differences good and bad that she discovered while learning PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://ironmansoftware.com/snek-integrating-python-in-powershell/"><em>Snek - Integrating Python in PowerShell</em></a></p><p>by Adam Driscoll on 14th November</p><p>Snek is a cross-platform PowerShell module for integrating with Python. It uses the Python for .NET library to load the Python runtime directly into PowerShell. Using the dynamic language runtime, it can then invoke Python scripts and modules and return the result directly to PowerShell as managed .NET objects.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.shudnow.net/2019/11/14/automate-azure-disk-encryption-for-windows-virtual-machines/"><em>Automate Azure Disk Encryption for Windows Virtual Machines</em></a></p><p>by Elan Shudnow on 14th November</p><p>The purpose of this article is to provide a script and demonstrate different scenarios in which my script can be used to help provide an automated method which can encrypt your OS and Data disks as well as automatically creating a Key Vault if one does not exist including the Access Policy configuration.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/dwebjr/reminder_gethistory_exists_i_completely_forgot/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Get-History exists, don&rsquo;t forget!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/alexandair/status/1195153217740562434?s=20"><em>Tweet of the Week</em></a></p><p>Happy Birthday PowerShell?</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=lk0JYDzEoVM&amp;feature=youtu.be"><em>Youtube: Building a Slack application with PowerShell</em></a></p><p>In this video, I show how to create a Slack App with PowerShell using Universal Dashboard. I also show how to tunnel the webserver from localhost via ngrok.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 8-November-2019</title><link>https://powershell.org/articles/2019-11-08-icymi-powershell-week-of-8-november-2019/</link><guid>https://powershell.org/articles/2019-11-08-icymi-powershell-week-of-8-november-2019/</guid><pubDate>Fri, 08 Nov 2019 15:00:58 +0000</pubDate><description>&lt;p&gt;Topics include speeding up the pipeline, while/until loops, why you shouldn&amp;rsquo;t use += and more!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include speeding up the pipeline, while/until loops, why you shouldn&rsquo;t use += and more!</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://powershell.one/tricks/performance/pipeline"><em>Speeding Up the Pipeline - powershell.one</em></a></p><p>by Tobias Weltner on the 3rd November</p><p>The PowerShell Pipeline is robust but tends to be slow. With a couple of tricks you can speed it up tremendously and make it as fast as classic foreach loops.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://sid-500.com/2019/11/04/powershell-do-while-vs-do-until/"><em>PowerShell: Do-While vs. Do-Until vs. While</em></a></p><p>by Patrick Gruenauer on the 4th November</p><p>Understanding the differences between a do-while, do-until and while loop could be confusing. Is it the same? Why are there multiple techniques? In this blog post you will learn the differences.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://theposhwolf.com/howtos/PS-Plus-Equals-Dangers/"><em>PowerShell’s plus equals (+=), the array serial killer</em></a></p><p>by Anthony Howell on the 4th November</p><p>&ldquo;I did a livestream recently where I created a function to parse an HTML table and convert it to a PowerShell object. If you followed along, you probably noticed that I used a += with no shame whatsoever. Luckily, @PrzemyslawKlys caught it and asked that I fix it (you can see the commit history here, the actual request was a Twitter DM). This was a great reminder to me that += should be avoided!&rdquo;</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.jonathanmedd.net/2019/11/ansible-windows-and-powershell-the-basics-part-7-utilising-powershell-dsc.html"><em>Ansible, Windows and PowerShell: the Basics – Part 7, Utilising PowerShell DSC</em></a></p><p>by Jonathan Medd on 5th November</p><p>In Part 7 of this series we’ll continue our journey with Ansible, Windows and PowerShell and look at how utilise PowerShell DSC. If you or your team already own some automation created using PowerShell DSC then it is possible to re-use that via an Ansible Playbook. Or maybe you think that you or they would prefer to create configuration automation going forward using a perhaps more familiar PowerShell DSC, then this could be a solution for you.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="http://jdhitsolutions.com/blog/powershell/6905/creating-a-powershell-backup-system/"><em>Creating a PowerShell Backup System</em></a></p><p>by Jeff Hicks on the 7th November</p><p>The start of a series of articles demonstrating how Jeff built a PowerShell-based backup system for critical files employing the System.IO.FileSystemWatcher.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/azureposh/status/1192801892314861569"><em>Tweet of the Week</em></a></p><p>New PowerShell module for managing Azure Functions</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=AsAQr9XK1Fc&amp;feature=youtu.be"><em>Youtube: Send Email with SendGrid and PowerShell</em></a></p><p>In this video, I set up a free SendGrid account in Azure and send email with the Rest API and PowerShell. I walk through the reusable function that builds the header and body of the message. This function is helpful for anyone who needs to send email from a PowerShell script that doesn’t have access to an SMTP relay or are behind a firewall that blocks outbound SMTP traffic.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 1-November-2019</title><link>https://powershell.org/articles/2019-11-01-icymi-powershell-week-of-1-november-2019/</link><guid>https://powershell.org/articles/2019-11-01-icymi-powershell-week-of-1-november-2019/</guid><pubDate>Fri, 01 Nov 2019 15:00:55 +0000</pubDate><description>&lt;p&gt;Topics include Teams, Scheduled Jobs, Halloween fun and more&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Teams, Scheduled Jobs, Halloween fun and more</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://4sysops.com/archives/managing-powershell-scheduled-jobs/"><em>Managing PowerShell scheduled jobs</em></a></p><p>by Mike Kanakos on 28th October</p><p>I&rsquo;d like to walk you through the management of PowerShell scheduled jobs. The concept of PowerShell jobs is not familiar territory for many PowerShell users. At first glance, the benefits of running any kind of job from the command line may not be obvious. Let&rsquo;s peel back the covers on managing scheduled jobs and the benefits that come with them.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://jdhitsolutions.com/blog/powershell/6879/the-powershell-magic-8-ball/"><em>The PowerShell Magic 8 Ball</em></a></p><p>by Jeffery Hicks on 28th October</p><p>Last year I shared some PowerShell code on Twitter about this time of year. I have a short script that uses Windows Presentation Foundation (WPF) to create a spooky graphical prompt that allows you to ask questions of a Magic 8 Ball.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://robindadswell.github.io/blog/2019/10/28/automated-microsoft-teams-policy-appliation-to-azure-ad-groups-using-powershell"><em>Automated Microsoft Teams Policy application to Azure AD Groups using PowerShell</em></a></p><p>by Robin Dadswell on 28th October</p><p>Use Azure AD Groups to manage teams policies for users who need different policies. This article provides a framework of how to do it including logging to teams.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/powershell-arraylist/"><em>Using PowerShell ArrayLists and Arrays</em></a></p><p>by Nathan Kasco on 29th October</p><p>Get back to PowerShell basics learning how to use PowerShell arraylists and basic arrays in this how-to walkthrough!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://powershell.one/tricks/network/porttest"><em>Port Testing with PowerShell</em></a></p><p>by TobiasPSP on 30th of October</p><p>Let’s check out how to use a TCPClient object to turn PowerShell into a fast and flexible network port tester!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/dorgmq/monitoring_microsoft_teams_using_powershell/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Monitoring Microsoft Teams using PowerShell Universal Dashboard</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/PSJamesP/status/1190267923174240256"><em>Tweet of the Week</em></a></p><p>Tickets are now on sale for PowerShell Summit!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=FvW8hC87OQk"><em>Create an Active Directory new user onboarding website with PowerShell</em></a></p><p>In this video, we use the Active Directory PowerShell Module and Universal Dashboard to create a self-service website for creating new users in Active Directory.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 25-October-2019</title><link>https://powershell.org/articles/2019-10-25-icymi-powershell-week-of-25-october-2019/</link><guid>https://powershell.org/articles/2019-10-25-icymi-powershell-week-of-25-october-2019/</guid><pubDate>Fri, 25 Oct 2019 15:00:13 +0000</pubDate><description>&lt;p&gt;Topics include RepAdmin, Certificates and Testing Teams connections.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include RepAdmin, Certificates and Testing Teams connections.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://msunified.net/2019/10/22/my-current-powershell-pomodoro-timer/?utm_content=buffer8f30b&amp;utm_medium=social&amp;utm_source=twitter.com&amp;utm_campaign=buffer"><em>My current #PowerShell #Pomodoro timer</em></a></p><p>by Ståle Hansen on 22nd October</p><p>Since Microsoft Teams arrived, I have had some issues adjusting and it has taken some time. But now I have incorporated Teams in my PowerShell Pomodoro timer, by simply closing it during my focus session and opening it again. I found that even if I used the newly implemented focus time in Teams, I still saw the number of unread notifications in the client. This was disturbing enough to bring me out of flow.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.shellandco.net/blog/2019/10/22/copy-certificate-to-the-windows-services-store/"><em>Copy certificate to the Windows Services store</em></a></p><p>by Nicolas Hahang on 22nd October</p><p>Find out how to locate a certificate and utilise them for a Windows Service.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://tomtalks.blog/2019/10/microsoft-teams-direct-routing-sip-tester-powershell-script/"><em>Microsoft Teams Direct Routing SIP Tester PowerShell Script</em></a></p><p>by Tom Arbuthnot on 21st October</p><p>“SIP Tester” is a sample PowerShell script from Microsoft that you can use to test Direct Routing Session Border Controller (SBC) connections in Microsoft Teams. This script tests the basic functionality of a customer-paired Session Initiation Protocol (SIP) trunk with Direct Routing.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://4sysops.com/archives/repadmin-vs-powershell-replication-cmdlets/"><em>Repadmin vs. PowerShell AD replication cmdlets</em></a></p><p>by Krishnamoorthi Gopal on 21st October</p><p>When it comes to fixing Active Directory replication issues, the Repadmin tool has been your first choice since the launch of Windows 2003. However, the PowerShell replication cmdlets are now offering more flexibility. Find some pros and cons in this article.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://devblogs.microsoft.com/scripting/copy-multi-valued-active-directory-attributes-from-one-user-to-another-with-powershell/"><em>Copy multi-valued Active Directory attributes from one user to another with PowerShell</em></a></p><p>by Doctor Scripto on 23rd October</p><p>We are in the middle of an Active Directory migration and need to copy the multi-valued attribute “ProxyAddresses” from old user accounts to new ones. Can you do with a few lines of code?</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/dlgf7f/thanks_to_this_subreddit_i_finally_finished_my/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>User shares his success story of building a GUI template cloning tool for VMs with the help of the PowerShell subreddit.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/PowerShell_Team/status/1187084663346454528"><em>Tweet of the Week</em></a></p><p>PowerShell 7 Preview 5 is officially released check out the post to get details on new features.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=tMDZt7bC6XE"><em>Youtube: From Scripting to Toolmaking- Taking the Next Step with Powershell</em></a></p><p>A recent session from Spice World ATX.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 18-October-2019</title><link>https://powershell.org/articles/2019-10-18-icymi-powershell-week-of-18-october-2019/</link><guid>https://powershell.org/articles/2019-10-18-icymi-powershell-week-of-18-october-2019/</guid><pubDate>Fri, 18 Oct 2019 15:00:38 +0000</pubDate><description>&lt;p&gt;Topics include idempotency, Jenkins, PowerShell for beginners and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include idempotency, Jenkins, PowerShell for beginners and more.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://powershell.anovelidea.org/powershell/iron-scripter-challenge-beginner-walk-through/"><em>PowerShell Beginners Have to Start Somewhere</em></a></p><p>by Dave Carroll on 13th October</p><p>A nice beginners guide to learning PowerShell with an overview of many concepts.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://robindadswell.github.io/blog/2019/10/14/writing-idempotent-powershell-scripts"><em>Writing Idempotent PowerShell scripts</em></a></p><p>by Robin Dadswell on 14th October 2019</p><p>An insight into how to write idempotent PowerShell scripts using a file as a simple example.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/encrypting-text-part-1"><em>Encrypting Text (Part 1)</em></a></p><p>by Idera website on 15th October 2019</p><p>Let’s take a look at a safe way of encrypting text on a computer. The Protect-Text function in this article takes any text and encrypts it automatically, no password needed. Instead of a password, it uses either your user account and machine, or just your machine as a secret.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/jenkins-powershell-git/"><em>Running PowerShell Scripts With Jenkins and Git</em></a></p><p>by Phillip Marshall on 17th October</p><p>Learn how to integrate Git version control with Jenkins to set up and schedule PowerShell scripts to run at predefined schedules.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.pipehow.tech/invoke-webscrape/"><em>Web Scraping with PowerShell</em></a></p><p>by Emanuel Palm on 17th October</p><p>Sometimes you end up in situations where you want to get information from an online source such as a webpage, but the service has no API available for you to get information through and it’s too much data to manually copy and paste. Or maybe you need to register a lot of entries on a website, but don’t have a bored friend to help out. Fear not, PowerShell can be your bored friend if you ask nicely!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/dgqty6/list_of_best_online_courses_to_learn_powershell/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>User gandhiN puts together a list of the best courses online to learn PowerShell, linking to sites like Pluralsight, Skillshare and Udemy.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/PSConfEU/status/1183628841828474881"><em>Tweet of the Week</em></a></p><p>A call for speakers for PSConf Europe June 2020.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=A6afjA5Q9eM"><em>Youtube: PowerShell Errors and Exceptions Handling</em></a></p><p>Learn how to handle PowerShell Errors and Exceptions. See how to recognize and deal with non-terminating and terminating PowerShell errors. Take control and handle various errors with try catch. Explore rich PowerShell error objects and see how to drill down into error properties. Wrap up with a practical example where you can provide better feedback to your users when your PowerShell code encounters the unexpected.</p>]]></content:encoded></item><item><title>2020 Conference Recording Changes</title><link>https://powershell.org/articles/2019-10-15-2020-conference-recording-changes/</link><guid>https://powershell.org/articles/2019-10-15-2020-conference-recording-changes/</guid><pubDate>Tue, 15 Oct 2019 13:14:41 +0000</pubDate><description>&lt;p&gt;Hi all!&lt;br&gt;
So!  You might have seen that the way the PowerShell + DevOps Global Summit records and distributes sessions will be changing.  Long story short:  The presenter will maintain all rights to the material and intellectual property, and Pluralsight will own distribution rights to the recording.&lt;br&gt;
There are many valid reasons to be upset about this.  Let&amp;rsquo;s walk through (1) what we gain from this, and (2) how we can work around some of the valid concerns&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Hi all!<br>
So!  You might have seen that the way the PowerShell + DevOps Global Summit records and distributes sessions will be changing.  Long story short:  The presenter will maintain all rights to the material and intellectual property, and Pluralsight will own distribution rights to the recording.<br>
There are many valid reasons to be upset about this.  Let&rsquo;s walk through (1) what we gain from this, and (2) how we can work around some of the valid concerns</p><h2 id="why-use-pluralsight" class="ps-heading">Why use Pluralsight?<a class="ps-heading-anchor" href="#why-use-pluralsight" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Money.  I know.  Disappointing.  In 2020, we&rsquo;ll be saving over $100k by using Pluralsight for the two conferences. But&hellip; what does this actually mean? Are we trying to turn a profit? Nope! Let&rsquo;s look on the bright side:</p><ul><li><strong>More speakers</strong>.  We had 39 last year.  We have 50 this year, pending speaker confirmations (<a href="https://sessions.eventraft.com/PowerShell2020">tentative agenda</a>).  This means more new speakers!</li><li><strong>Fewer multi-session speakers</strong>.  We needed 16 in 2019.  We have 5 this year.  This means less stress</li><li><strong>More scholarships</strong>.  Excluding conference book funded scholarships, we had 5 scholarships in 2019, up to 10 ~$4,500 scholarships in 2020</li><li><strong>Same small conference.</strong>  We don&rsquo;t need to add seats and can maintain the higher speaker-and-PS-team-to-attendee ratio</li></ul><p>So!  These are all good things, and we should keep them in mind, but let&rsquo;s dive into some of the complaints about this change.</p><h2 id="why-are-you-taking-away-our-recordings" class="ps-heading">Why are you taking away our recordings!<a class="ps-heading-anchor" href="#why-are-you-taking-away-our-recordings" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><blockquote><p>Given the response from the community, it seems prudent for the organisers to at least state their intent.  To help stop the perceived (or real) conflict of interest here.  Both with Don and other PluralSight employees in the conference committee</p><ul><li>Glenn Sarti</li></ul></blockquote><p>Yep, thanks for getting us to write this, we probably should have had something like this ready.  Next year.  Unless something changes - we do read conference feedback!<br>
Oh!  In case anyone missed<a href="https://powershell.org/2019/07/a-farewell-and-a-bunch-of-hellos/">the announcement</a> - while we do occasionally pester Don for advice, he is no longer involved in running the conference.  Of those of us running the conference, Missy authored a course for Pluralsight three years ago, but had no involvement in the decision, and that&rsquo;s the extent of our direct relationships to Pluralsight.  And just to re-iterate - both sides benefit from this contract, assuming you see the bright sides we listed as benefits!</p><blockquote><p>Lotta folks in the community going to that event (even some of the speakers, I&rsquo;m sure) are there because the yt vids of times past helped them immensely along their way</p><ul><li>Joel Sallow<br>
That&rsquo;s very unfortunate. I&rsquo;m still in talks with the wife about being in a financial position to be able to attend this time around. Pluralsight is expensive and my current company isn&rsquo;t keen on paying for anything that they don&rsquo;t deem as necessary.</li><li>Matt Bobke<br>
I&rsquo;m against these sessions which are not only produced for free, but at significant cost for the speakers, being put behind a pay wall</li><li>Thomas Rayner</li></ul></blockquote><p>Totally!  I won&rsquo;t lie - this will gate off some of the material.  That said,<br>
(1) speakers can, and should, upload all materials.  These will still be available to everyone, and<br>
(2), speakers are<em>encouraged</em> to get practice speaking ahead of the conference, and would likely be in demand from one of the several PowerShell user groups who do recorded presentations, before or after the conference.<br>
Ultimately, a good portion of these sessions will end up out there in some form or another.</p><blockquote><p>This goes against the historical nature of the community and will be detrimental to the conference/s in future<br>
&hellip;<br>
it feels like a sell out tbh and will damage your event&rsquo;s reputation going forward</p><ul><li>Ryan Yates</li></ul></blockquote><p>I get it - I&rsquo;d prefer the recordings be out there in the open as well.  Here&rsquo;s the thing though:  If you balance getting new speakers involved, the several all-costs-paid scholarships we&rsquo;ve added, the reduced stress from fewer multi-session speakers, that the session materials can and should be distributed openly, and the potential workaround that any user group may record these before or after the fact - is this detrimental to the conference or damaging to the event&rsquo;s reputation?  I guess it depends on who you ask, but it seems a little more nuanced.</p><blockquote><p>&ldquo;, and that a talent release form may be required 30 days prior to the show.&rdquo;<br>
Not sure how enforcable or even legal for non-US people. This is risk for speakers with only 30 days, given how far out the CFP and acceptance process is. We would do all this work &hellip; to find out we can&rsquo;t sign the release form.</p><ul><li>Glenn Sarti</li></ul></blockquote><p>Totally.  As soon as details are finalized we&rsquo;ll be in touch with speakers, the 30 day thing is just a deadline.  I&rsquo;m hoping they can live with just the e-mail acks, but there&rsquo;s a chance we&rsquo;ll need signatures as mentioned there.</p><blockquote><p>Sorry if you&rsquo;re feeling attacked @psjamesp. I know you and the crew work hard to put on a good event.</p><ul><li>Chris Hunt<br>
Echoing @cdhunt it&rsquo;s the decision that I disagree with, not the people that collectively make said decision</li><li>Ryan Yates<br>
Yeah, we love and appreciate you guys. Just concerned about the impact on the wider community 🙂</li><li>Joel Sallow</li></ul></blockquote><p>&lt;3.  Thank you all for bringing up these points without bringing too many pitchforks : )</p><h2 id="what-now" class="ps-heading">What now?<a class="ps-heading-anchor" href="#what-now" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>So!  Yes, it&rsquo;s sad.  But some good will come out of this, and you can help ensure folks without access to Pluralsight or the conference can still access the content:</p><ul><li>Are you a speaker?  Want to talk at a user group to ensure you are recorded in a publicly available format?  Ping Warren</li><li>Are you interested in a session that is only available on Pluralsight?  Ping the speaker to see if they would be interested in speaking and recording at a user group</li><li>Are you hoping we change this for next year, even with the benefits it gives us?  Be sure to tell us in the conference feedback, or ping<a href="mailto:summit@powershell.org">summit@powershell.org</a></li><li>Do you want to convince PluralSight to open these up beyond subscription or conference-goer gates?  This likely won&rsquo;t be possible, but give Thomas Rayner a ping in Discord</li></ul><p>We&rsquo;ll update this post with specifics on how access to the content will work, once this has been finalized.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 11-October-2019</title><link>https://powershell.org/articles/2019-10-11-icymi-powershell-week-of-11-october-2019/</link><guid>https://powershell.org/articles/2019-10-11-icymi-powershell-week-of-11-october-2019/</guid><pubDate>Fri, 11 Oct 2019 15:00:10 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell GUIs, New PS 7 features and more&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell GUIs, New PS 7 features and more</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://jdhitsolutions.com/blog/powershell/6840/making-sense-of-parallel-foreach-object-in-powershell-7/"><em>Making Sense of Parallel FOREACH-OBJECT in Powershell 7</em></a></p><p>by Jeffery Hicks on 7th October</p><p>Having this feature as part of the language is a welcome addition. But this isn’t magic and there are real-world consequences when you use it. The -Parallel parameter will spin up a collection of runspaces and run your scriptblock in each one. Running something in parallel does not mean in order.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.yobyot.com/cloud/select-azure-subscription-easily/2019/10/08/"><em>Select an Azure Subscription Easily</em></a></p><p>by Alex Neihaus on 8th of October</p><p>You can use the power of the PowerShell pipeline with OGV to actually make it easy to select the active Azure subscription you want.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.jonathanmedd.net/2019/10/ansible-windows-and-powershell-the-basics-part-3-windows-roles-and-features.html"><em>Ansible, Windows and PowerShell: the Basics – Part 3, Windows Roles and Features</em></a></p><p>by Jonathan Medd on 8th of October</p><p>Part 3 of a multipart post about using Ansible and PowerShell to prepare servers with Windows Roles and Features.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://community.idera.com/database-tools/powershell/powertips/b/tips/posts/simple-powershell-chat"><em>Simple PowerShell Chat</em></a></p><p>posted on Idera on 9th of October</p><p>Here’s a fun PowerShell script that you can use to create a simple multi-channel chat room. All you need is a network share where everyone has read and write permissions.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://ridicurious.com/2019/10/10/powershell-loops-and-iterations/?fbclid=IwAR0vPLDIlpyXEwmxcIkPJlhA5ISk7I_EvCDSZoTJapF1jjVHdqj0ARmF_ig"><em>Deep Dive: PowerShell Loops and Iterations</em></a></p><p>by Akshi Srivastava on 10th of October</p><p>PowerShell supports many different types of loops Akshi does a great job of explaining them all.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/dfa89u/psscriptmenugui_use_a_csv_file_to_make_a/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>User Weebsnore shares a way to turn a csv file into a GUI for launching multiple powershell scripts.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/Steve_MSFT/status/1181950525832495104"><em>Tweet of the Week</em></a></p><p>Stevelee demos a new feature of Select-String in PS 7 Preview 5, text highlighting.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=aHlI2_0oiws"><em>Youtube: LetsPlay Powershell: PSKoans #14</em></a></p><p>If you&rsquo;ve never used PSKoans before this video shows how it can be a fun way to learn PowerShell with Pester tests.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://powershellnews.podbean.com/e/episode-021-interview-with-david-littlejohn-and-james-petty-at-powershell-on-the-river/"><em>Podcast</em></a></p><p>This episode was recorded at the PowerShell on the River event. It is a sitdown interview with David Littlejohn and James Petty. We discuss the speakers and topics at the event, while also talking about future PowerShell events across the country. We also discuss the OnRamp program and its value to both the industry and the students.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 4-October-2019</title><link>https://powershell.org/articles/2019-10-04-icymi-powershell-week-of-4-october-2019/</link><guid>https://powershell.org/articles/2019-10-04-icymi-powershell-week-of-4-october-2019/</guid><pubDate>Fri, 04 Oct 2019 15:00:07 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell GUIs, Azure, Exchange and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell GUIs, Azure, Exchange and more.</p><p>Special thanks to Robin Dadswell, Mark Roloff, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://searchwindowsserver.techtarget.com/tutorial/How-to-work-with-the-WSUS-PowerShell-module"><em>How to work with the WSUS PowerShell module</em></a></p><p>by Dan Franciscus on 27th September</p><p>The PoshWSUS module automates the process to synchronize and approve Windows updates. You can also use it to perform essential maintenance on the WSUS server.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://office365itpros.com/2019/09/30/report-exchange-online-mailbox-quota-usage-over-threshold/"><em>Report Exchange Online Mailbox Quota Usage Over Set Threshold</em></a></p><p>by Tony Redmond on 30th September</p><p>A new twist to an old script, find a way to report on Mailbox quota&rsquo;s using PowerShell!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://medium.com/wortell/azure-sentinel-automating-your-use-cases-with-powershell-and-the-azsentinel-module-380606e601f5"><em>Azure Sentinel: automating your Use Cases with PowerShell and the #AzSentinel module</em></a></p><p>by Maarten Goet on 30th September</p><p>Say hello to our open-source PowerShell module called AzSentinel. The goal is to provide programmatic access to Azure Sentinel.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="http://eskonr.com/2019/10/use-powershell-to-create-azure-ad-dynamic-security-group-for-azure-ad-joined-aadj-devices-only/"><em>Use powershell to create Azure AD dynamic security group for Azure AD joined (AADJ) devices only</em></a></p><p>by Eswar Koneti on 2nd October</p><p>Need to have a group which is based on attributes which cannot be used in Dynamic AAD groups, well with PowerShell we can make it so!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://adamtheautomator.com/powershell-menu-gui/"><em>How to Build a PowerShell Menu GUI for your PowerShell Scripts</em></a></p><p>by Nathan Kasco on 3rd of October</p><p>It&rsquo;s weekend project time again and today you will learn how to build a lightweight system tray context menu where you can quickly and easily launch your most coveted PowerShell scripts.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/darvhv/i_made_a_module_to_download_depressing_lock/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>User <em>stib</em> shares with us his module in the PowerShell Gallery to update lockscreen images with some that are a bit less cheery.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/Jaykul/status/1179479231769784327"><em>Tweet of the Week</em></a></p><p>An interesting thread on interview questions that understand enumerations.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=j9wtAezZ9x0&amp;feature=youtu.be"><em>Youtube: Basic Powershell Commands For Beginners</em></a></p><p>In this video we will be taking a look at some basic powershell commands which are essential when using powershell.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 27-September-2019</title><link>https://powershell.org/articles/2019-09-27-icymi-powershell-week-of-27-september-2019/</link><guid>https://powershell.org/articles/2019-09-27-icymi-powershell-week-of-27-september-2019/</guid><pubDate>Fri, 27 Sep 2019 15:00:29 +0000</pubDate><description>&lt;p&gt;Topics include emojis, orchestration, 365 storage, ternary operators, bash and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include emojis, orchestration, 365 storage, ternary operators, bash and more.</p><p>Special thanks to Robin Dadswell, Mark Roloff, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://dev.to/omiossec/vm-orchestration-using-powershell-core-and-azure-functions-2faa"><em>VM orchestration using PowerShell Core and Azure Functions</em></a></p><p>by Olivier Miossec on 23rd September</p><p>Imagine a situation where you need to download data from external sources and you need to make complex calculations and aggregations on it. You don&rsquo;t know in advance the amount of data you will have and the schedule of flow during the day, more calculations and aggregations process are mono-thread. Find out how to setup this using PowerShell!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://devscopeninjas.azurewebsites.net/2019/09/24/clear-office-365-storage-size-with-versioning/"><em>Clear Office 365 Storage Size with Versioning</em></a></p><p>by Ricardo Calejo on 24th September</p><p>One of the things most people don’t know when creating a Group or a Team with an associated SharePoint Site, or even a new sitecollection, is that out of the box, its document libraries (or similar) have versioning enabled and supporting a maximum of 500 versions. This a cool feature, but can impact your Office365 storage quota and severely decrease its size.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://toastit.dev/2019/09/25/ternary-operator-powershell-7/"><em>Getting Familiar with the Ternary Operator in PowerShell 7</em></a></p><p>by Josh King on 25th September</p><p>What the heck is a &ldquo;ternary&rdquo; and what&rsquo;s it doing in my PowerShell?!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://devblogs.microsoft.com/commandline/integrate-linux-commands-into-windows-with-powershell-and-the-windows-subsystem-for-linux/"><em>Integrate Linux Commands into Windows with PowerShell and the Windows Subsystem for Linux</em></a></p><p>by Mike Battista on 26th September</p><p>A common question Windows developers have is “why doesn’t Windows have &lsquo;INSERT FAVORITE LINUX COMMAND HERE&rsquo; yet?”. Whether longing for a powerful pager like less or wanting to use familiar commands like grep or sed, Windows developers desire easy access to these commands as part of their core workflow.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.cloudsecuritea.com/2019/09/generate-an-overview-of-all-microsoft-flows-with-powershell/"><em>Generate an overview of all Microsoft Flows with PowerShell</em></a></p><p>by Maarten Peeters on 26th September</p><p>Users can easily create flows in SharePoint and in their OneDrive so as a company you want to monitor and manage this behaviour. With PowerShell you can generate a list all flows that have been created and who created it. This way you can keep track on who’s building flows, which triggers and actions are users using and the current state of the flow.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/d8exe0/powershell_is_now_part_of_the_net_core_30/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>.Net Core 3.0 is now released and with it new container images. By popular demand Microsoft is now including PowerShell Core as part of the .Net Core 3.0 SDK container image.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/lee_ford/status/1177329239806349315"><em>Tweet of the Week</em></a></p><p>PowerShell and Emojis&hellip; say no more!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=uq5GfJ3dCxg&amp;"><em>Youtube: PowerShell Module Development</em></a></p><p>Asish Raj Discusses the ins and outs of PowerShell Modules on his PowerShell basics series.</p>]]></content:encoded></item><item><title>Last Call for Summit 2020 CFP</title><link>https://powershell.org/articles/2019-09-21-last-call-for-summit-2020-cfp/</link><guid>https://powershell.org/articles/2019-09-21-last-call-for-summit-2020-cfp/</guid><pubDate>Sat, 21 Sep 2019 01:37:43 +0000</pubDate><description>&lt;p&gt;So! &lt;a href="https://www.papercall.io/summit2020"&gt;Proposals&lt;/a&gt; for the PowerShell + DevOps Global Summit 2020 are due in less than two weeks, on October 1st. We have some solid talks lined up, but we&amp;rsquo;re still behind where we were last year, and need more proposals!&lt;br&gt;
We&amp;rsquo;ve heard a lot of questions - &lt;em&gt;What topics are you looking for?&lt;/em&gt;, &lt;em&gt;I don&amp;rsquo;t know what to propose!&lt;/em&gt; and so on. Let&amp;rsquo;s cover some ways to find topics and hopefully spark some ideas!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>So!<a href="https://www.papercall.io/summit2020">Proposals</a> for the PowerShell + DevOps Global Summit 2020 are due in less than two weeks, on October 1st. We have some solid talks lined up, but we&rsquo;re still behind where we were last year, and need more proposals!<br>
We&rsquo;ve heard a lot of questions -<em>What topics are you looking for?</em>,<em>I don&rsquo;t know what to propose!</em> and so on. Let&rsquo;s cover some ways to find topics and hopefully spark some ideas!</p><h2 id="add-some-spice" class="ps-heading">Add some spice<a class="ps-heading-anchor" href="#add-some-spice" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>First things first: We&rsquo;re not going to come up with your topic!<a href="https://www.freecodecamp.org/news/how-to-get-a-technical-talk-accepted-at-a-conference-or-event-8ba291d11c62/">This bit</a> has some solid advice on mixing things up:</p><ul><li><p>I saw a talk with X format and decided to apply it to Y subject.</p></li><li><p>While working on a project, I thought, “Wow! I wish I knew X, Y, and Z before I started!”</p></li><li><p>A conversation with coworkers about X led me to see the potential for a talk on it.</p></li></ul><p>The key here is that there are plenty of ways to add variety to a topic - these certainly aren&rsquo;t comprehensive, just a few ideas.</p><h3 id="spice-up-pester" class="ps-heading">Spice up Pester<a class="ps-heading-anchor" href="#spice-up-pester" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>As an example, if we asked for<em>Pester</em> sessions, there are plenty of ways to come up with a unique Pester talk.</p><ul><li>Can you use Pester for security things (compliance, CI/CD, vulnerability assessments, etc.)?</li><li>Can you use Pester for data validation of some sort (e.g. AD, SQL)?</li><li>Have you used Pester for Infrastructure testing?</li><li>Might you use Pester for Monitoring? (even if this might not be the optimal way to monitor things)</li></ul><p>At the end of the day, PowerShell can be used across a variety of fields, and general purpose tools like Pester can be used in each of those, in unique ways.</p><h3 id="other-spices" class="ps-heading">Other spices<a class="ps-heading-anchor" href="#other-spices" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>So! We used a few specific-ish variations of Pester as an example.  Take a step back and consider PowerShell itself:</p><ul><li>How do you use PowerShell in different fields (keeping in mind that each field has it&rsquo;s own set of sub-fields)? Bonus points if the concepts / ideas / code you include are applicable in a variety of fields.</li><li>How do you use PowerShell outside of work, or for general productivity (side note: running this CFP would be a<em>paaaaain</em> without PowerShell!).</li><li>What lessons can we take from other fields, ecosystems, or projects? For example, while these may seem new-ish to some of us, we borrowed and applied testing, CI/CD, and other ideas that have long been integrated in the ecosystems of other languages.</li></ul><p>All this said, please don&rsquo;t think you need something super unique and never-before-seen!</p><h2 id="tried-and-true" class="ps-heading">Tried and true<a class="ps-heading-anchor" href="#tried-and-true" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Every day, new folks enter the field, or start learning about PowerShell, automation, DevOps, etc. Yes, people have talked about testing and other topics in the past&hellip; but guess what? Chances are we&rsquo;ll still accept some solid talks on important concepts.<br>
So! What are some of these evergreen topics?</p><ul><li>Release pipelines, including the individual components you might find:<ul><li>Source control</li><li>Build systems and frameworks</li><li>Pester and testing</li><li>Deployment</li></ul></li><li>PowerShell modules or advanced functions<ul><li>How to write them</li><li>Best practices</li><li>How to distribute and maintain them</li><li>etc.</li></ul></li><li>Using common tools/practices with PowerShell<ul><li>VSCode and extensions</li><li>Windows Subsystem for Linux</li><li>Debugging</li><li>etc.</li></ul></li></ul><p>There&rsquo;s plenty more. You can probably think about other core topics that folks will always need to learn, re-learn, or catch up on new ideas for.</p><h2 id="2020-specifics" class="ps-heading">2020 specifics<a class="ps-heading-anchor" href="#2020-specifics" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>So!  What about the 2020 summit?  A few notes on our current state:</p><h3 id="topics-were-looking-for" class="ps-heading">Topics we&rsquo;re looking for<a class="ps-heading-anchor" href="#topics-were-looking-for" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Keep in mind everything we&rsquo;ve said so far. Don&rsquo;t overthink it. Show us something<em>you</em> are interested in or working on. That being said, we haven&rsquo;t seen many submissions on:</p><ul><li>Monitoring</li><li>Testing and Pester</li><li>DSC, or wrapping DSC (a la dsc_lite)</li><li>Functions</li><li>Modules</li></ul><h3 id="topics-that-will-have-competition" class="ps-heading">Topics that will have competition<a class="ps-heading-anchor" href="#topics-that-will-have-competition" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Every year, we have some topics that have a bit of competition. This year is no different. If you have something to share on these topics<em>don&rsquo;t let this scare you off</em>, just know there will be a little competition.</p><ul><li>Kubernetes</li><li>Working with web APIs</li><li>Contributing to open source</li><li>Azure (granted, I<em>much</em> prefer attendee talks to vendor happy-path talks, for what it&rsquo;s worth)</li></ul><p>That&rsquo;s about it! We have less than two weeks and need more proposals, now is a good time to start writing them!  We&rsquo;ll close with a few handy links:</p><ul><li><a href="https://www.papercall.io/summit2020">2020 PowerShell + DevOps Global Summit CFP</a> - closing October 1st</li><li><a href="https://powershell.org/2018/08/the-summit-2019-call-for-topics-some-ideas/">2019 CFP ideas</a> - still applicable, although many of DevOps tools considered<em>esoteric</em> might be worth a proposal</li><li><a href="https://powershell.org/2019/09/be-a-speaker-at-powershell-and-devops-global-summit-2020/">2020 CFP ideas</a></li><li>#Conferences in the<a href="http://bit.ly/PSSlack">PowerShell Slack team</a> - plenty of folks willing to chat about or review your proposals in there.  You can also ping<a href="mailto:content@powershell.org">content@powershell.org</a>, but the Slack route is faster, and has more eyes on it</li></ul>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 20-September-2019</title><link>https://powershell.org/articles/2019-09-20-icymi-powershell-week-of-20-september-2019/</link><guid>https://powershell.org/articles/2019-09-20-icymi-powershell-week-of-20-september-2019/</guid><pubDate>Fri, 20 Sep 2019 15:00:15 +0000</pubDate><description>&lt;p&gt;Topics include Active Directory, Azure Labs, Ansible, PowerShell 7 Preview 4 and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Active Directory, Azure Labs, Ansible, PowerShell 7 Preview 4 and more.</p><p>Special thanks to Robin Dadswell, Mark Roloff, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.petri.com/most-useful-powershell-cmdlets-for-managing-and-securing-active-directory"><em>Most Useful PowerShell Cmdlets for Managing and Securing Active Directory</em></a></p><p>by Russell Smith on 16th September</p><p>Examples of some useful Active Directory PowerShell commands and how to use them.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://mcpmag.com/articles/2019/09/17/azure-devtest-labs-with-powershell.aspx"><em>Building Azure DevTest Labs with PowerShell</em></a></p><p>by Adam Bertram on 17th September</p><p>Learn how to use a freely available PowerShell module called PSAzDevTestLabs to build Azure DevTest Labs, add VMs to them and more.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.jonathanmedd.net/2019/09/ansible-windows-and-powershell-the-basics-introduction.html"><em>Ansible, Windows and PowerShell: the Basics – Introduction</em></a></p><p>by Jonathan Medd on 18th September</p><p>A follow up to the a recent session at PowerShell Southampton on using both Ansible and PowerShell together.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://devblogs.microsoft.com/powershell/powershell-7-preview-4/"><em>PowerShell 7 Preview 4</em></a></p><p>by Steve Lee on 19th September</p><p>Announcement around PowerShell 7 Preview 4, touching on some of the changes.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://demiliani.com/2019/09/20/creating-an-azure-sql-database-backup-via-powershell/"><em>Creating an Azure SQL Database backup via Powershell</em></a></p><p>by Stefano Demiliani on 20th September</p><p>Find yourself needing to backup Azure SQL databases and download that backup? Here&rsquo;s a neat way to automate the process!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/richardhicks/status/1173568514080292864"><em>Tweet of the Week</em></a></p><p>Richard Hicks puts his Windows 10 Always on VPN and Direct Access scripts on GitHub!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=DhzR7mbFE9I"><em>Youtube: Customize Your PowerShell Prompt with Nerd Fonts &amp; ANSI Escape Sequences</em></a></p><p>You can spice up your PowerShell prompt by using a variety of techniques. In this video, we&rsquo;ll take a look at using ANSI escape sequences to colorize various components of your prompt, using Nerd Fonts to add glyphs (icons) to your prompt, and how you can write content anywhere on the terminal using coordinates.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 13-September-2019</title><link>https://powershell.org/articles/2019-09-13-icymi-powershell-week-of-13-september-2019/</link><guid>https://powershell.org/articles/2019-09-13-icymi-powershell-week-of-13-september-2019/</guid><pubDate>Fri, 13 Sep 2019 15:00:24 +0000</pubDate><description>&lt;p&gt;Topics include Active Directory, SCCM, Security and More.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Active Directory, SCCM, Security and More.</p><p>Special thanks to Robin Dadswell, Mark Roloff, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://evotec.xyz/what-do-we-say-to-health-checking-active-directory/"><em>What do we say to health checking Active Directory?</em></a></p><p>by Przemyslaw Klys on 8th September</p><p>There are plenty of tools out there to check the health of AD, but Przemyslaw shares the tools he&rsquo;s created with the community.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="http://www.obvus.be/2019/09/08/cleaning-up-badmin-accounts-in-configmgr/"><em>CLEANING UP (B)ADMIN ACCOUNTS IN CONFIGMGR</em></a></p><p>by Merlijn Van Waeyenberghe on 8th September</p><p>Find out an easy way to change accounts within SCCM - especially useful when you have that one admin account that is everywhere.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://medium.com/@Bank_Security/how-to-running-powershell-commands-without-powershell-exe-a6a19595f628"><em>Run PowerShell without Powershell.exe — Best tools &amp; techniques</em></a></p><p>by Bank Security on 9th September</p><p>During last months, observing how the attackers and consequently the antivirus are moving, I thought of writing this article for all the pen testers and red teamers who are looking for the best technique to use their PowerShell scripts or command lines during post exploitation phase without running PowerShell.exe and thus avoiding being caught by the Next-Gen Antivirus, EDR or from the Blue Team or Threat Hunting team.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.powershellmagazine.com/2019/09/09/weekly-module-spotlight-importexcel/"><em>Weekly Module Spotlight: ImportExcel</em></a></p><p>by Ravikanth Chaganti on 9th September</p><p>Ravikanth looks at his module of the week ImportExcel giving a good overview of what is happening.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://toastit.dev/2019/09/10/powershell7-foreach-parallel/"><em>Can Parallel For Each Loops in PowerShell 7 Tear Me Away from PoshRSJob?</em></a></p><p>by Josh King on 10th September</p><p>PoshRSJob has been my go to module for Parallelization for years&hellip; let&rsquo;s see if a head to head test with the new PowerShell 7 feature will change that.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/d3byf0/powershell_all_the_things/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Of course the most popular Reddit post is a meme. Dig into the comments on this post and find some great information on randomness and using Get-Random with an array.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/AndySvints/status/1171405216350126080"><em>Tweet of the Week</em></a></p><p>Ever wanted to manage Zoom with PowerShell, well now there is a module for that!</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://youtu.be/efRnjlZKCGw"><em>Youtube: Define Cross-Platform System Configuration Requirements with PowerShell</em></a></p><p>Trevor Sullivan looks at how you create PowerShell &ldquo;Requirements&rdquo; on a Mac OS system using the PowerShell module called &ldquo;Requirements&rdquo;.</p>]]></content:encoded></item><item><title>The Ternary Cometh</title><link>https://powershell.org/articles/2019-09-12-the-ternary-cometh/</link><guid>https://powershell.org/articles/2019-09-12-the-ternary-cometh/</guid><pubDate>Thu, 12 Sep 2019 21:35:34 +0000</pubDate><description>&lt;p&gt;Developers are likely to be familiar with ternary conditional operators as they&amp;rsquo;re legal in many languages (Ruby, Python, C++, etc).  They&amp;rsquo;re also often used in coding interviews to test an applicant as they can be a familiar source of code errors.  While some developers couldn&amp;rsquo;t care less about ternary operators, there&amp;rsquo;s been a cult following waiting for them to show up in Powershell.  That day is &lt;a href="https://powershell.visualstudio.com/PowerShell/_build/results?buildId=31915"&gt;almost upon us.&lt;/a&gt;&lt;br&gt;
Any Powershell developer can easily be forgiven for scratching their heads and wondering what a ternary is.  In the most basic sense a ternary evaluates an expression to a binary result and carries out one of two possible outcomes.  Lets start by looking at some code examples:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Developers are likely to be familiar with ternary conditional operators as they&rsquo;re legal in many languages (Ruby, Python, C++, etc).  They&rsquo;re also often used in coding interviews to test an applicant as they can be a familiar source of code errors.  While some developers couldn&rsquo;t care less about ternary operators, there&rsquo;s been a cult following waiting for them to show up in Powershell.  That day is<a href="https://powershell.visualstudio.com/PowerShell/_build/results?buildId=31915">almost upon us.</a><br>
Any Powershell developer can easily be forgiven for scratching their heads and wondering what a ternary is.  In the most basic sense a ternary evaluates an expression to a binary result and carries out one of two possible outcomes.  Lets start by looking at some code examples:</p><p><code>puts (if 1 then 2 else 3 end) 2</code>PS &gt; 1 ? 2 : 3
PS &gt; 2
`The above is the same conditional expressed first in Ruby, then in Powershell, and both examples have a return of 2.  First off, let&rsquo;s get around the obvious confusion in the Powershell example.  The alias for Where-Object is &lsquo;?&rsquo;, and that is not what the &lsquo;?&rsquo; represents in the powershell ternary operation.  The likely reason for implementing &lsquo;?&rsquo; instead of another character is for inter-language operability and reducing the level of effort for migrating code from other languages to Powershell.<br>
The best way to explain how to read the ternary example above is to express it in a more familiar context.  That is to say, let&rsquo;s turn it into an If/Then/Else statement:</p><p><code>if(1){2}else{3}</code>Right off we can see one of the benefits of a ternary is that it makes code more succinct.  It should also make more sense why we refer to the ternary as a conditional operator.  It&rsquo;s intended as an optional replacement for If/Than/Else in much the same way that Select/Case is for organizing multiple conditional statements.  Wondering if there&rsquo;s a performance enhancement?<br><img src="https://scontent.xx.fbcdn.net/v/wl/t1.15752-0/s480x480/70352759_377454299851433_6857271860543881216_n.png?_nc_cat=105&amp;_nc_log=1&amp;_nc_oc=AQmAjykQ4CuOWI8SBA_aHRSBjOdpHV-OrzlMs9iI9J6egJ2w6vNGr5AuYIRZkJNQJiQ4JH7ENVdcNKNy-UGUyGb-&amp;_nc_ht=scontent.xx&amp;oh=4db9b829b678c0e87ec610471f7054b5&amp;oe=5DF6EE21" alt=""><br>
Nope.  So the ternary is intended to boost readability but does that happen in reality?  Some engineers, who shall remain nameless, misuse its purpose into statements you&rsquo;ll wish you could unsee or will make your eyes bleed.  For example:</p><p><code>Bool c1, c2,c3; // Assign some values to c1, c2 and c3. int x = c1?c2?1:2:c3?3:4;</code>Who wants to code review that?  Or decipher it while trying to resolve a problem that&rsquo;s affecting your critical operations?<br>
There&rsquo;s a definite place for ternary operators in Powershell.  They have the potential to enhance the programing experience while simplifying readability.  Some will look upon the ternary as a way to show off their elite skills and create code only they can read.  The great engineers will leverage the best syntax for the correct reason at just the right moment in their code.  If you want to experiment with Powershell ternary operators early, grab the build linked above (or any later build) and run '
Enable</p><ul><li/></ul><p>ExperimentalFeature</p><p>PSTernaryOperator&rsquo;.</p><p>Please, enjoy ternary operators responsibly.<br>
Remembering<a href="https://en.wikipedia.org/wiki/Dorothy_Vaughan">Dorothy Vaughan</a> on this anniversary of JFK&rsquo;s &ldquo;We choose to go to the Moon&rdquo; speech.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 6-September-2019</title><link>https://powershell.org/articles/2019-09-06-icymi-powershell-week-of-6-september-2019/</link><guid>https://powershell.org/articles/2019-09-06-icymi-powershell-week-of-6-september-2019/</guid><pubDate>Fri, 06 Sep 2019 15:00:20 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell meetups, Network Connections, PowerShell on Android, Regex and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell meetups, Network Connections, PowerShell on Android, Regex and more.</p><p>Special thanks to Robin Dadswell, Mark Roloff, Prasoon Karunan V, and Kevin Laux.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.networkadm.in/rtpsug-powershell-saturday/">POWERSHELL SATURDAY: RALEIGH 2019</a></p><p>by Mike Kanakos on 1st of September</p><p>Research Triangle PowerShell Users Group is hosting a PowerShell Saturday. Get Mike&rsquo;s insight on what a PowerShell Saturday is and details about how the event will be set up in Raleigh, NC.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://deploymentresearch.com/detecting-wired-wireless-and-vpn-connections-using-powershell/">Detecting Wired, Wireless, and VPN Connections using PowerShell</a></p><p>by Johan Arwidmark on 2nd of September</p><p>Johan was having trouble detecting network connection type across 50k machines in his environment. In his blog post he shares some details about a script he used to check if a system was using wired/wireless/VPN.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://dev.to/thementor/i-run-powershell-on-android-and-so-can-you-458k">I run PowerShell on Android and so can you !!</a></p><p>by TheMentor on 3rd of September</p><p>Step by Step guide detailing the process of installing PowerShell on an Android device.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.powershellmagazine.com/2019/09/03/weekly-module-spotlight-polaris/"><em>Weekly Module Spotlight: Polaris</em></a></p><p>by Ravikanth Chaganti on September 3rd</p><p>Polaris is a cross-platform, minimalist web framework for PowerShell that is quick and easy to use.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://devblogs.microsoft.com/powershell/powershell-foreach-object-parallel-feature/"><em>PowerShell ForEach-Object Parallel Feature</em></a></p><p>by Paul Higinbotham on September 4th</p><p>PowerShell 7.0 Preview 3 is now available with a new ForEach-Object Parallel Experimental feature. This feature is a great new tool for parallelizing work, but like any tool, it has its uses and drawbacks. This article describes this new feature, how it works, when to use it and when not to.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.reddit.com/r/PowerShell/comments/d0fovu/speaker_opportunities_for_powershell_southampton/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Speaker Opportunities for PowerShell Southampton User Group</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://twitter.com/BrettMiller_IT/status/1169226147315539968"><em>Tweet of the Week</em></a></p><p>Brett asks about using git with PowerShell.</p><h6 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p><a href="https://www.youtube.com/watch?v=GUUF8TIL6Pg"><em>Youtube: Detecting Text Patterns with PowerShell Regular Expressions</em></a></p><p>When you want to extract some text from a string, regular expressions come to the rescue. There are a few different ways of using regular expressions in PowerShell, but the -match operator is arguably the easiest. We&rsquo;ll take a look at how to use the -match operator to evaluate regular expressions against singleton and array string values. We&rsquo;ll also explore the built-in $matches variable, which gets populated when you have a positive match against a singleton string value, using the -match operator.</p>]]></content:encoded></item><item><title>Be a Speaker at PowerShell and DevOps Global Summit 2020!</title><link>https://powershell.org/articles/2019-09-03-be-a-speaker-at-powershell-and-devops-global-summit-2020/</link><guid>https://powershell.org/articles/2019-09-03-be-a-speaker-at-powershell-and-devops-global-summit-2020/</guid><pubDate>Tue, 03 Sep 2019 17:42:35 +0000</pubDate><description>&lt;p&gt;We are so excited for the 2020 PowerShell and DevOps Global Summit! We’re about halfway through the CFP season and are still looking for your awesome submissions. If you are hesitating, please don’t&amp;hellip; think seriously about submitting a topic or two. To help you, we’d like to give you some ideas about what makes a submission stand out (and what doesn’t).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Something Unique…&lt;/strong&gt; We’re looking for a new spin or twist on an old (or new) topic. If something similar has been done at a previous Summit, think about how you’re doing something different from what’s previously been presented. DevOps topics are always popular, but what new thing are you doing with your source control, your testing, or your build pipeline?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Failures&amp;hellip;&lt;/strong&gt; Alternatively, is there something you started out to do and at some point, figured out that you it wasn’t going to work the way it was planned? If you’ve had some good lessons learned that you think would benefit others, we’d love to hear about it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Broad scope vs. deep scope&amp;hellip;&lt;/strong&gt; If you’ve done a snack “bake-off” and could talk about chips, cookies, and crackers, this session would be attended by folks who prefer chips or cookies or crackers. However, a session that is only about cookies might only be of interest to Rambling Cookie Monsters. If you’re a subject matter expert on chips, though, and can show how to use chips to build a house, that would have that uniqueness factor we’re also looking for.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple submissions&amp;hellip;&lt;/strong&gt; Multiple submissions on different topics help us select a wide variety of topics. It’s hard to say from year to year what topics will be popular. For example, we had a lot of Git and Pester submissions last year&amp;hellip; not so many this year. We’re looking for variety so submit as many ideas as you have.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Something that wasn’t selected last year&amp;hellip;&lt;/strong&gt; We may have really liked your submission last year and it may have simply been on the bubble. You’re only up against the submissions that we’ve seen for this year, so if you had a submission from last year that you feel passionate about and is still a hot topic, please submit it!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;“Post OnRamp” submissions are welcome&amp;hellip;&lt;/strong&gt; We have a graduated class of OnRamp students from last year who we want to continue learning. Therefore, we’ll be looking for a small number of sessions at this level.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some additional things we’d like to add:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>We are so excited for the 2020 PowerShell and DevOps Global Summit! We’re about halfway through the CFP season and are still looking for your awesome submissions. If you are hesitating, please don’t&hellip; think seriously about submitting a topic or two. To help you, we’d like to give you some ideas about what makes a submission stand out (and what doesn’t).</p><ul><li><strong>Something Unique…</strong> We’re looking for a new spin or twist on an old (or new) topic. If something similar has been done at a previous Summit, think about how you’re doing something different from what’s previously been presented. DevOps topics are always popular, but what new thing are you doing with your source control, your testing, or your build pipeline?</li><li><strong>Failures&hellip;</strong> Alternatively, is there something you started out to do and at some point, figured out that you it wasn’t going to work the way it was planned? If you’ve had some good lessons learned that you think would benefit others, we’d love to hear about it.</li><li><strong>Broad scope vs. deep scope&hellip;</strong> If you’ve done a snack “bake-off” and could talk about chips, cookies, and crackers, this session would be attended by folks who prefer chips or cookies or crackers. However, a session that is only about cookies might only be of interest to Rambling Cookie Monsters. If you’re a subject matter expert on chips, though, and can show how to use chips to build a house, that would have that uniqueness factor we’re also looking for.</li><li><strong>Multiple submissions&hellip;</strong> Multiple submissions on different topics help us select a wide variety of topics. It’s hard to say from year to year what topics will be popular. For example, we had a lot of Git and Pester submissions last year&hellip; not so many this year. We’re looking for variety so submit as many ideas as you have.</li><li><strong>Something that wasn’t selected last year&hellip;</strong> We may have really liked your submission last year and it may have simply been on the bubble. You’re only up against the submissions that we’ve seen for this year, so if you had a submission from last year that you feel passionate about and is still a hot topic, please submit it!</li><li><strong>“Post OnRamp” submissions are welcome&hellip;</strong> We have a graduated class of OnRamp students from last year who we want to continue learning. Therefore, we’ll be looking for a small number of sessions at this level.</li></ul><p>Some additional things we’d like to add:</p><ul><li><strong>We don’t care who you are&hellip;</strong> If you’re concerned about not being an MVP, haven’t spoken before, or are simply suffering from imposter syndrome, don’t. Every speaker has been a first-time speaker, and we’re specifically looking to introduce some new speakers to the community every year.</li><li><strong>Don’t procrastinate&hellip;</strong> The CFP closes October 1st, no exceptions. It’s open for two months, which is plenty of time.</li><li><strong>Repeats are iffy&hellip;</strong> If you have a talk that’s been done at multiple conferences already, or a talk that’s been recorded and is available on YouTube, it probably won’t be selected. We’re looking for new content. However, if you have a talk you’ve given at a user group meeting that was well-received? Please submit it.</li><li><strong>Talk to us&hellip;</strong> If you’re on the fence about submitting or have a topic you’re thinking about but want to know if there are a bunch of similar topics, please reach out to us at “content [at] powershell [dot] org” and ask. We won’t tell you that we have 17.5 submissions on write-host, but we will say “yeah that’s a really popular topic this year”. (As of today, there aren’t really any topics that are heavily populated, so keep that in mind. And there aren’t any submissions on write-host yet.)</li></ul><p>In case you&rsquo;ve forgotten, here&rsquo;s a link to the CFP: <a href="https://www.papercall.io/summit2020">https://www.papercall.io/summit2020</a><br>
Let’s keep the submissions coming and we are looking forward to an AWESOME Summit in 2020!</p>
]]></content:encoded></item><item><title>A Better Way To Search Events</title><link>https://powershell.org/articles/2019-08-30-a-better-way-to-search-events/</link><guid>https://powershell.org/articles/2019-08-30-a-better-way-to-search-events/</guid><pubDate>Fri, 30 Aug 2019 17:09:21 +0000</pubDate><description>&lt;p&gt;I have put together a security script to use as an alerting system. Using a CSV file containing information on which users are assigned which computer, the event logs are searched to discover when a user signs into a device outside their normal assignments. The final result of that script can be viewed &lt;a href="https://github.com/tobor88/BTPS-SecPack/blob/master/Event%20Alerts/UnusualUserSignInAlert.ps1"&gt;HERE&lt;/a&gt; if interested. I will do my best to provide unique real world search queries for my examples.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I have put together a security script to use as an alerting system. Using a CSV file containing information on which users are assigned which computer, the event logs are searched to discover when a user signs into a device outside their normal assignments. The final result of that script can be viewed<a href="https://github.com/tobor88/BTPS-SecPack/blob/master/Event%20Alerts/UnusualUserSignInAlert.ps1">HERE</a> if interested. I will do my best to provide unique real world search queries for my examples.</p><p>In order to accomplish this task, I originally believed I was going to need to search the event logs based on user and computer. Although this turned out to not be the case I figured it was a pretty useful thing to figure out how to do. That is the task that led me here.</p><p>The best way to search events is using the<a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-winevent?view=powershell-6">Get-WinEvent</a> cmdlet. This method is far superior to<a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-eventlog?view=powershell-5.1">Get-EventLog</a> in both speed and filtering ability. The documentation for the Filter Hash related parameters are a little lacking.</p><p>When searching events you will want to keep in mind that each event source is handled as a document containing a sequence of events. Windows Event Log uses query expressions based on a subset of XPath 1.0 for selecting events from their sources. When you specify a query, you are also specifying an event channel for the context of the query. When you select an event with an event query, the entire event is selected, not a portion of the event information.</p><p><strong>FILTERHASHTABLE</strong></p><p>The FilterHashTable parameter is probably the most straight forward to use. I have taken the below example from Microsoft&rsquo;s TechNet site as this Paramter is the most straight foward and easy to use. The format is easy to understand as we are searching for an array of properties. To accurately describe these properties, it is easiest to view the events in Event Viewer.</p><p><code>$StartTime = (Get-Date).AddDays(-7) Get-WinEvent -FilterHashtable@{ Logname='Application'; ProviderName='Application Error'; Data='iexplore.exe'; StartTime=$StartTime }</code>If you have experience with the<a href="https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/New-Object?view=powershell-6">New-Object</a> cmdlet you have most likely added properties to the newly created object in this same fashion. Looking at the list of available property queries below, we are not able to search by computer name. I checked to see what other options were available. Data below is showing as an array. I have known this option to allow the entering of an SID or a username to query the event log. I have not been able to successfully add multiple properties into that value.</p><ul><li><strong>LogName</strong>=</li><li><strong>ProviderName</strong>=</li><li><strong>Path</strong>=</li><li><strong>Keywords</strong>=</li><li><strong>ID</strong>=</li><li><strong>Level</strong>=</li><li><strong>StartTime</strong>=</li><li><strong>EndTime</strong>=</li><li><strong>UserID</strong>=</li><li><strong>Data</strong>=</li><li><code>=</code>*<strong>SuppressHashFilter</strong>=`Below is a FilterHashTable query that searches the Sysmon events for all Network connections that happened over the last 1.2 hours.</li></ul><p><code>Get-WinEvent -MaxEvents 1 -FilterHashtable @{LogName="Microsoft-Windows-Sysmon/Operational"; Id=3; StartTime=(Get-Date).AddHours(-1.2)}</code><strong>FILTERXPATH</strong></p><p>The next parameter defined is the FilterXPath parameter. This ended up being the one I used because it required less typing than FilterXML. More on this towards the end of the juicy stuff we are about to get into. To ensure the correct information is being used open the Event Viewer, (eventvwr.msc) and go to the XML view of the event you wish to query. In my case it was Security Event ID 4624.Below is a sample of the xml format for this event.</p><p>`4624
1
0
12544
0
0x8020000000000000</p><p>53282</p><p>Security
DC1</p><h2 id="00000000-0000-0000-0000-000000000000" class="ps-heading">S-1-5-0 ####
david.haller
LEGION
0x3e7
S-1-5-21-1005
david.haller
LEGION
0x33648
2
I_Am_God
Negotiate
Why-Is-It-Blue
{00000000-0000-0000-0000-000000000000}<a class="ps-heading-anchor" href="#00000000-0000-0000-0000-000000000000" 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>0 0x210
C:\Windows\System32\winlogon.exe
10.0.0.8 0
%%1833</p><p>`===============================================================</p><p>Microsoft has given us this syntax:<code>Get-WinEvent -FilterXPath "*[System[Level=3 and TimeCreated[timediff(@SystemTime) &lt;= 86400000]]]"</code></p><p>This starts with a wildcard character which I have to apologize I do not remember the significance of. Each XML section is enclosed inside a set of [ ]. Starting small, If we wanted to query the &lsquo;<strong>System</strong>&rsquo; section and the &lsquo;<strong>EventData</strong>&rsquo; section it would look like the this.</p><p><code>$XPath = '*[System[] and EventData[]]'</code>To define the properties we wish to search for we need to add those properties inside the set of brackets for<strong>System</strong> and or<strong>EventData</strong>. I am going to add on to what we have defined so far. The event id is an integer. Because it is an integer we do not want to add single quotes around the value.</p><p><code>$XPath = '*[System[EventID=4624] and EventData[]]'</code>Adding to the &ldquo;<strong>EventData</strong>&rdquo; gets a little more tricky. In the XML format above you can see that a property has been defined for the XML tags and each tag is called Data. Following the format at this TechNet reference:<a href="https://docs.microsoft.com/en-us/previous-versions//aa385231(v=vs.85)">https://docs.microsoft.com/en-us/previous-versions//aa385231(v=vs.85)</a>, we are able to view how to define this type of property. I placed a variable in the value field to demonstrate the need for single quotes as this is a string and single quotes are expected in order for the query to work.</p><p><code>$SamAccountName = 'Amahl.Farouk'; Get-WinEvent -FilterXPath "*[System[EventID=4624] and EventData[Data[@Name='TargetUserName']='$SamAccountName']"']]</code>To add a second field to query the System section is fairly straight forward. To accomplish this we need to follow the last value with &lsquo;and&rsquo; and add the new property as can be seen from the original Microsoft TechNet example. For those of you are unfamliar there are 86400000 seconds in 24 hours. So the time created value below gets the current system time and queries events that are less than or equal to a day old.</p><p><code>$XPath = "*[System[EventID=4624 and TimeCreated[timediff(@SystemTime) &lt;= 86400000 ]] and EventData[Data[@Name='TargetUserName']='$SamAccountName']"</code>Now We are searching for Event ID 4624, over the last 24 hours containing a specific username. Time to add the IP Address property. In the event log this value has an IP address and the computer&rsquo;s name was not able to be found. I have a list of computer names so I will need to convert those names to IP addresses for my query to be successful. This meant for my script, that a<a href="https://docs.microsoft.com/en-us/powershell/module/dnsclient/resolve-dnsname?view=win10-ps">Resolve-DnsName</a> cmdlet had to be used to get the required value. There are numbers in this value but it is still not an integer so we are going to need single quotes around the value again.</p><p><code>$XPath = "*[System[EventID=4624 and TimeCreated[timediff(@SystemTime) &lt;= 86400000]] and EventData[Data[@Name='TargetUserName']='$SamAccountName'] and EventData[Data[@Name='IpAddress']='$IPv4Address']]"</code>As you can see above, in order to successfully query the computer value and TargetUsername in the EventData XML tags we needed to add a second &ldquo;and EventData&rdquo;. This successfully finds what I was looking for.</p><p>**FI
LTERXML
**</p><p>FilterXML was another possible option that could have been used. In Microsoft&rsquo;s TechNet Documentation, one of the examples they gave was as follows.</p><p><code># Using the FilterXML parameter: PS&gt; Get-WinEvent -FilterXML "*[System[Level=3 and TimeCreated[timediff(@SystemTime)&lt;= 86400000]]]"</code>I should mention you can easily get yourself started with the -FilterXML value using Windows Event Viewer. Simply open Windows Event Viewer, in the right hand pane select &ldquo;<strong>Create Custom View</strong>&rdquo; than enter the Event ID values you wish to search for, keywords, time frames, computer names, etc. Then click the XML tab and it will show you what the XML query looks like. This is great for getting started however it will not work for more detailed queries which I will build on in the information below.</p><p>To query the Event Log using the FilterXML parameter we need to add the QueryList and Query tags on the outside of the defining properties we wish to filter by. Using -FilterXML is simply XML formatted text of what we are looking for. The same sectioning rules apply as before except FilterXML wants an XML formatted document when FilterXPath wants just the properties defined. The XPath 1.0 language Windows uses must resolve to &ldquo;Events&rdquo; not a single &ldquo;Event&rdquo;. This seemed to make the most sense for my original situation so it is what I went with. </p><p>Why would these two similar options be available for use you might question?!?!?! The Windows Event log does not fully support XPath query language. More information on this can be read<a href="https://docs.microsoft.com/en-us/windows/win32/wes/consuming-events#xpath-10-limitations">HERE</a>
and<a href="https://docs.microsoft.com/en-us/windows/win32/wes/consuming-events#limitations">HERE</a>
if interested. Windows Event Log uses a subset of XPath 1.0. There are specific limitations of XPath 1.0. The more options available the better the chance you are able to find what you are looking for using this cmdlet. Below we can view an example of why we need to have these two query parameters.</p><p>I wanted to build a query that returns services I do not have record of or know about. To do this I need to filter out known services. Although this list of services below can be extended greatly there is a max limit of 32 expressions that can be added to the XPath query. If you exceed this limit you will receive the PowerShell error message &ldquo;<em>Get-WinEvent : The specified query is invalid</em>&rdquo;. This prevents my ability to accomplish this task.<br>
If you run the below query you will notice that it returns every Event ID under the sun after filtering the one Event ID I am trying to return information on.</p><p>`$FilterXML = @"</p><pre><code> *[System[(EventID="7045")]]</code></pre><p>and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;MpKslDrv&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Microsoft Edge Update Service (edgeupdate)&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Microsoft Edge Update Service (edgeupdatem)&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Microsoft Edge Elevation Service (MicrosoftEdgeElevationService)&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Wireless Keyboard Filter Device Service&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;FileSyncHelper&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;OneDrive Updater Service&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Google Update Service (gupdatem)&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Google Update Service (gupdate)&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Google Chrome Elevation Service&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Adobe Genuine Monitor Service&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Adobe Genuine Software Integrity Service&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;AdobeUpdateService&rdquo;]]
and *[EventData[Data[@Name=&ldquo;ServiceName&rdquo;]!=&ldquo;Mozilla Maintenance Service&rdquo;]]</p><p>&ldquo;@
Get-WinEvent -FilterXML $FilterXML
`You are able to add Suppress tags to remove Event ID&rsquo;s you do not want returned. Under other circumstances this can work. For the goal of the above query, I will need over 32 &lsquo;Suppress&rsquo; tags to filter Event ID&rsquo;s I do not want returned. If you run into a situation such as the one above you<strong>DO NOT NEED</strong> to add the Suppress tags. Simply use the -FilterXPath parameter instead. This would turn my above query into this:</p><p><code>$XPath = '*[System[(EventID="7045")]] and [EventData[Data[@Name="ServiceName"]!="MpKslDrv"]] and [EventData[Data[@Name="ServiceName"]!="Action1 Agent"]] and [EventData[Data[@Name="ServiceName"]!="Microsoft Edge Update Service (edgeupdate)"]] and [EventData[Data[@Name="ServiceName"]!="Microsoft Edge Update Service (edgeupdatem)"]] and [EventData[Data[@Name="ServiceName"]!="Microsoft Edge Elevation Service (MicrosoftEdgeElevationService)"]] and [EventData[Data[@Name="ServiceName"]!="Microsoft Update Health Service"]] and [EventData[Data[@Name="ServiceName"]!="Sysmon"]] and [EventData[Data[@Name="ServiceName"]!="SysmonDrv"]] and [EventData[Data[@Name="ServiceName"]!="Wireless Keyboard Filter Device Service"]] and [EventData[Data[@Name="ServiceName"]!="FileSyncHelper"]] and [EventData[Data[@Name="ServiceName"]!="OneDrive Updater Service"]] and [EventData[Data[@Name="ServiceName"]!="Splashtop Software Updater Service"]] and [EventData[Data[@Name="ServiceName"]!="Splashtop Virtual Hid"]] and [EventData[Data[@Name="ServiceName"]!="Google Update Service (gupdatem)"]] and [EventData[Data[@Name="ServiceName"]!="Google Update Service (gupdate)"]] and [EventData[Data[@Name="ServiceName"]!="Google Chrome Elevation Service"]] and [EventData[Data[@Name="ServiceName"]!="Adobe Genuine Monitor Service"]] and [EventData[Data[@Name="ServiceName"]!="Adobe Genuine Software Integrity Service"]] and [EventData[Data[@Name="ServiceName"]!="AdobeUpdateService"]] and [EventData[Data[@Name="ServiceName"]!="Mozilla Maintenance Service"]]' Get-WinEvent -FilterXPath $XPath</code>The query must have at least one select statement. For each suppress statement, there must be at least one select statement that specifies the same path. If the select and suppress query return the same events, the suppress statement takes precedence. If you select events from multiple sources, the events are returned in time stamp order. If you use the system time stamp and the rate of events is high, it is possible that more than one event will have the same time stamp. When this occurs, the ordering of events becomes ambiguous and the events may appear out of order. Be careful when comparing floating point numbers in XPath queries. Any string representation of a floating point number is approximated and the value displayed in XML might not match the number stored with the event. Floating point numbers should be compared as being less than or greater than a constant.<br>
If you are required to use XML filtering for your situation my conclusion so far is that you need to know what you are looking for. As far as I am aware there is not a solution to perform the above kind of process of elimination without manual overview or FilterXPath.<br>
To compensate for this in my own environment, (where I have centralized important events using Windows Event Forwarding), I import centralized events into a SQL database and perform queries there. There are a lot of benefits to this including speed. If you wish to use the tool I created for this it can be obtained from<a href="https://github.com/tobor88/BTPS-SecPack/tree/master/WEF%20Application">HERE</a>. I have set up instructions<a href="https://btps-secpack.com/wef-application">HERE</a> if you wish to use the application as well.<br>
The &ldquo;Suppress&rdquo; &lsquo;<a href="https://docs.microsoft.com/en-us/windows/win32/wes/queryschema-elements">Query Schema Element</a>&rsquo; I mentioned can be used to filter out the extra Event ID&rsquo;s returned by a query. There is a limit of 32 expressions for the &lsquo;Suppress&rsquo; tags as well.  The below example is used to query the event logs for any user accounts that have been added to high privileged administrator groups. The &lsquo;Suppress&rsquo; expression is used to filter out Event ID 4799, preventing the return of unwanted information</p><p>`$FilterXML = @&rdquo;</p><p>(<em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Administrators&rdquo;]]) or
(</em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Domain Admins&rdquo;]]) or
(<em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Schema Admins&rdquo;]]) or
(</em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Enterprise Admins&rdquo;]]) or
(<em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Print Operators&rdquo;]]) or
(</em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Server Operators&rdquo;]]) or
(<em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;DnsAdmins&rdquo;]]) or
(</em>[EventData[Data[@Name=&ldquo;TargetUserName&rdquo;] = &ldquo;Backup Operators&rdquo;]])
and
*[System[(EventID=&lsquo;4732&rsquo;) or (EventID=&lsquo;4733&rsquo;) or (EventID=&lsquo;4756&rsquo;) or (EventID=&lsquo;4757&rsquo;) or (EventID=&lsquo;4728&rsquo;) or (EventID=&lsquo;4729&rsquo;)]]</p><p>*[System[(EventID=4799)]]</p><p>&ldquo;@
Get-WinEvent -FilterXML $FilterXML
`Another query you might find useful is one that searches the event log for an instance where the local Administrator user entered a password to execute a process with elevated privileges over the last 24 hours.</p><p>`$XML = "</p><p>            *[System[(EventID=4648) and TimeCreated[timediff(@SystemTime) &lt;= 86400000]] and EventData[Data[@Name=&lsquo;ProcessName&rsquo;]=&lsquo;C:\Windows\System32\consent.exe&rsquo;] and EventData[Data[@Name=&lsquo;TargetUserName&rsquo;]=&lsquo;Administrator&rsquo;]]</p><p>"
$AdminConsentGiven = Get-WinEvent -FilterXml $XML -MaxEvents 1 | Select-Object -Property *
`It is suggested to use XPath queries when you are searching the event logs for a simple expression from a single source. Use an XML structured query when you are searching from more than one event log source or you are using a compound expression with a dozen or more expressions.</p><p>Another example Microsoft gives for filtering events involves the<a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/where-object?view=powershell-6"> Where-Object</a> cmdlet. The overhead on Where-Object is fairly high so I try to avoid using it whenever I can as it will search through everything a second time and can noticeably slow down the execution time of a script. I hope you found this useful and were able to learn what I was able to through this. Until next time&hellip;</p><ul><li><a href="https://roberthosborne.com">tobor</a></li></ul>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 30-August-2019</title><link>https://powershell.org/articles/2019-08-30-icymi-powershell-week-of-30-august-2019/</link><guid>https://powershell.org/articles/2019-08-30-icymi-powershell-week-of-30-august-2019/</guid><pubDate>Fri, 30 Aug 2019 15:21:52 +0000</pubDate><description>&lt;p&gt;Topics include DNS, GUI&amp;rsquo;s, automation of legacy tools, Azure test environment setups and more!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include DNS, GUI&rsquo;s, automation of legacy tools, Azure test environment setups and more!</p><p>Special thanks to Kevin Laux, Prasoon Karunan V, and Robin Dadswell.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://evotec.xyz/comparing-two-or-more-objects-visually-in-powershell-cross-platform/"><em>Comparing two or more objects visually in PowerShell</em></a></p><p>by Przemyslaw Klys on 25th August</p><p>Compare-Object is good, but how about comparing multiple objects and seeing the results in an easy to see format!</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://cirriustech.co.uk/blog/create-dynamic-dns-azure-dns-pt2"><em>Create your own Dynamic DNS service using Azure DNS - part 2</em></a></p><p>by Graham Gold on 26th August</p><p>Use a very lightweight updater client (windows or linux) that uses an Azure PowerShell function to update the DNS record-set entry.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://adamtheautomator.com/build-powershell-gui/"><em>How to Build a PowerShell GUI for your Scripts</em></a></p><p>by June Castillote on 26th August</p><p>PowerShell is a command-line tool but did you know it can also be used as a base for graphical interfaces? Sometimes command-line isn&rsquo;t the best kind of interface for a particular instance. Building a PowerShell GUI for for your service desk is a great example. This is one of those times when it is more appropriate to build graphical tools instead.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://devblogs.microsoft.com/scripting/automating-quser-through-powershell/"><em>Automating Quser through PowerShell</em></a></p><p>by Dan Reist on 27th August</p><p>I need to log a user off every computer they’re logged into. The problem is, I don’t know which ones. How can I discover which computers they’re logged into and then log them off?</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://nocolumnname.blog/2019/08/28/splitting-functions-from-scripts-in-bulk/"><em>Splitting Functions from Scripts in bulk</em></a></p><p>by Shane O&rsquo;Neill on 28th August</p><p>Ever wanted to use some of the functions within a script and easily call them? Turns out it is incredibly easy, find out more with Shane.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://twitter.com/Steve_MSFT/status/1166801611781312512"><em>Tweet of the Week</em></a></p><p>A call out from Steve for what we want to be blogged about.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://www.youtube.com/watch?v=YAF1sHYAwBY"><em>Youtube: Title of Youtube Video</em></a></p><p>From the London PSUG, Naw explains in great detail and with passion what he created at The British Museum to automate the setup of test environments using Azure PowerShell, Pester (Unit Test &amp; Infrastructure Test), Azure DevOps/Pipeline.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 23-August-2019</title><link>https://powershell.org/articles/2019-08-23-icymi-powershell-week-of-23-august-2019/</link><guid>https://powershell.org/articles/2019-08-23-icymi-powershell-week-of-23-august-2019/</guid><pubDate>Fri, 23 Aug 2019 15:00:41 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell 7 Preview 3, Universal Dashboard, URI Data Types and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell 7 Preview 3, Universal Dashboard, URI Data Types and more.</p><p>Special thanks to Robin Dadswell, Mark Roloff, Prasoon Karunan V, and Kevin Laux.</p><h3 id="how-to-combine-the-elements-of-two-arrays-using-powershell" class="ps-heading"><a href="https://dotnet-helpers.com/powershell/how-to-combine-the-elements-of-two-arrays-using-powershell/?fbclid=IwAR2VMOInc6GwiZ4BiPVE46Fn-vQcQLCF5F-AgLSiAkq_XsD1rf0Nbje29rc" title="https://dotnet-helpers.com/powershell/how-to-combine-the-elements-of-two-arrays-using-powershell/?fbclid=IwAR2VMOInc6GwiZ4BiPVE46Fn-vQcQLCF5F-AgLSiAkq_XsD1rf0Nbje29rc">How to combine the elements of two arrays using PowerShell</a><a class="ps-heading-anchor" href="#how-to-combine-the-elements-of-two-arrays-using-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Thiyagu on 18th of August</p><p>Information on the different ways to join Arrays depending on the scenario.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://devblogs.microsoft.com/powershell/powershell-7-preview-3/">PowerShell 7 Preview 3 | PowerShell</a></p><p>by Steve Lee on 20th of August</p><p>The new preview (3) for PowerShell 7 is available.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://devblogs.microsoft.com/powershell/new-telemetry-in-powershell-7-preview-3/">New Telemetry in PowerShell 7 Preview 3 | PowerShell</a></p><p>by Sydney Smith on 20th of August</p><p>Additional telemetry data points will be collected starting with PowerShell 7 Preview 3, find out what they are and how to toggle them off if needed.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://mikefrobbins.com/2019/08/21/parallel-and-throttlelimit-parameters-added-to-foreach-object-in-powershell-7-preview-3/">Parallel and ThrottleLimit Parameters added to ForEach-Object in PowerShell 7 Preview 3</a></p><p>by Mike F Robbins on 21st of August</p><p>Preview 3 of PowerShell 7 was just released. ForEach-Object now has Parameters for Parallel and ThrottleLimit.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://www.imab.dk/sccm-client-health-monitor-script/">SCCM Client Health Monitor Script - imab.dk</a></p><p>by Martin Bengtsson</p><p>The SCCM Client Health Monitor Script is a PowerShell script which fixes common issues related to SCCM client health.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://www.reddit.com/r/PowerShell/comments/crlmhy/i_bet_you_all_have_been_doing_this_for_years_but/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Using URI Data types instead of strings.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://twitter.com/pewa2303/status/1163306192392859649?s=21"><em>Tweet of the Week</em></a></p><p>PowerShell: Implementing a Progress Bar with Write-Progress</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://youtu.be/6eOjRQi4vUU">Data to Dashboard in under an hour with Universal Dashboard! with Adam Driscoll</a></p><p>Adam Driscoll explores his tool Universal Dashboard, learn how to take advantage of a Powerful PowerShell tool</p>]]></content:encoded></item><item><title>A Peculiar Parse</title><link>https://powershell.org/articles/2019-08-20-a-peculiar-parse/</link><guid>https://powershell.org/articles/2019-08-20-a-peculiar-parse/</guid><pubDate>Tue, 20 Aug 2019 19:40:17 +0000</pubDate><description>&lt;h2 id="heading" class="ps-heading wp-block-heading"&gt; &lt;a class="ps-heading-anchor" href="#heading" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;One of the best enhancements to Powershell was the inclusion of custom classes in v5. We originally wrote scripts, then we wrote cmdlets, followed by modules, and now we&amp;rsquo;ve graduated, with Class.&lt;/p&gt;
&lt;p&gt;I recently decided I wanted to write some code that would build a website. What better way to do that than by creating a class just for me? That&amp;rsquo;s rhetorical by the way. My early class code looked like this:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<h2 id="heading" class="ps-heading wp-block-heading"> <a class="ps-heading-anchor" href="#heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>One of the best enhancements to Powershell was the inclusion of custom classes in v5. We originally wrote scripts, then we wrote cmdlets, followed by modules, and now we&rsquo;ve graduated, with Class.</p><p>I recently decided I wanted to write some code that would build a website. What better way to do that than by creating a class just for me? That&rsquo;s rhetorical by the way. My early class code looked like this:</p><p><code>class mysite { [string]$SiteName = 'mysite' [string]$PhysPath = 'c:\mysite' [string]$Binding = '*:8000:' mysite(){ Import-Module IISAdministration,WebAdministration } [void]CreateSite(){ $newsite = @{ Name = $this.SiteName PhysicalPath = $this.PhysPath BindingInformation = $this.Binding } New-IISSite @newsite (Get-IISServerManager).CommitChanges() } }</code>With this code I&rsquo;m able to create my IIS website and see it in IIS Manager. But then I thought it&rsquo;d be great to add the object representing the new site to my custom class. To do this I&rsquo;ll need to create another property. It&rsquo;s generally a good idea to cast properties as the appropriate object type.  That means adding a new property to the class and loading the appropriate namespaces so the casting would work.  I also updated my method to pass the object representing my website to the new property.</p><p><code>class mysite { [string]$SiteName = 'mysite' [string]$PhysPath = 'c:\mysite' [string]$Binding = '*:8000:' [Microsoft.Web.Administration.Site[]]$SiteObject mysite(){ [void][System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.Web.Administration') [void][System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.Web.Management') Import-Module IISAdministration,WebAdministration } [void]CreateSite(){ $newsite = @{ Name = $this.SiteName PhysicalPath = $this.PhysPath BindingInformation = $this.Binding } $this.SiteObject += New-IISSite @newsite -Passthru (Get-IISServerManager).CommitChanges() } }</code>Looks great right?  I was able to create my new site and see it in IIS Manager.  The next day I wanted to try it out again so I deleted my website, loaded my code, and then got hit with a nasty error from the parser.</p><p><img src="https://scontent.xx.fbcdn.net/v/wl/t1.15752-0/s480x480/69283328_2866413096703634_4259896023284973568_n.png?_nc_cat=104&amp;_nc_log=1&amp;_nc_oc=AQnsep46eWke901Uzia9GmY3zbuEAnbk9WImb3IVthQegbzYfeL8zjSXiEj6381xEfXtbK1gLIP9kNUgzJ-kXykw&amp;_nc_ht=scontent.xx&amp;oh=95f0b7ade60da2b13897597e64bfdc4f&amp;oe=5DD64557" alt=""/><p>`PS C:\Dev&gt; . .\powershellorg.ps1
At C:\Dev\powershellorg.ps1:5 char:4</p><ul><li>[Microsoft.Web.Administration.Site[]]$SiteObject</li><li><pre tabindex="0"><code/></pre></li></ul><p>Unable to find type [Microsoft.Web.Administration.Site].
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : TypeNotFound
`Turns out, the parser in powershell is reading my code and sees an object type it doesn&rsquo;t know.  That would be my new property with the casting to [Microsoft.Web.Administration.Site].  At this point, the namespace containing the class I&rsquo;m casting as hasn&rsquo;t been loaded because that code is in the class constructor.  So I figure, no problem!  I&rsquo;ll just load the namespaces before I define my class, score one point for Colyn!</p><p><code>[void][System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.Web.Administration') [void][System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.Web.Management') class mysite { [string]$SiteName = 'mysite' [string]$PhysPath = 'c:\mysite' [string]$Binding = '*:8000:' [Microsoft.Web.Administration.Site[]]$SiteObject mysite(){ Import-Module IISAdministration,WebAdministration } [void]CreateSite(){ $newsite = @{ Name = $this.SiteName PhysicalPath = $this.PhysPath BindingInformation = $this.Binding } $this.SiteObject += New-IISSite @newsite -Passthru (Get-IISServerManager).CommitChanges() } }</code>Or so I thought, as it turns out I still receive the same exception.  Going back to my troubleshooting skills I stepped through my code in the ISE, without exception.  Wait, what?  That&rsquo;s right, there was no exception when I stepped through my code.  Thinking I might have fat fingered my code, or maybe didn&rsquo;t save correctly, I tried again.  Same error.</p><p>Upon further research I discovered that the parsing protocol in powershell doesn&rsquo;t read linearly.  In its early passes over my code it observed I was creating a class and decided to load the class first.  Because the [mysite] class is loading before my reflection calls, the code bombs.  +1 for non linear dynamics.  This is true even when implementing the &lsquo;using namespace&rsquo; capability that launched with v5:</p><p><code>using namespace Microsoft.Web.Administration; using namespace Microsoft.Web.Management; class mysite { [string]$SiteName = 'mysite' [string]$PhysPath = 'c:\mysite' [string]$Binding = '*:8000:' [Microsoft.Web.Administration.Site[]]$SiteObject mysite(){ Import-Module IISAdministration,WebAdministration } [void]CreateSite(){ $newsite = @{ Name = $this.SiteName PhysicalPath = $this.PhysPath BindingInformation = $this.Binding } $this.SiteObject += New-IISSite @newsite -Passthru (Get-IISServerManager).CommitChanges() } }</code>I determined two ways around this problem.  The first was to keep the class in a separate file, but create a new .ps1 file that would load the dependent namespaces and then use dot sourcing to load the class file.  I did a quick experiment to test this assumption which gave positive reinforcement for the idea:</p><p><img src="https://scontent.xx.fbcdn.net/v/wl/t1.15752-0/s480x480/68576638_490740718161416_4996682901111177216_n.png?_nc_cat=108&amp;_nc_log=1&amp;_nc_oc=AQkZ0I7swgdlk0kzRJoAdY15EGff-nFrtXlSm8-wdGcmEnR3-P_Aa6STzf3v2TiOOReuw2c7x0Q3XWpjIbuLyvAh&amp;_nc_ht=scontent.xx&amp;oh=896b4925e9a6a684a06ba200a974802b&amp;oe=5DD6844A" alt=""/><p>Of course the polymorphism of powershell allows a less cumbersome and equally less exact solution.  I can simply recast the property as a generic object.</p><p><code>class mysite { [string]$SiteName = 'mysite' [string]$PhysPath = 'c:\mysite' [string]$Binding = '*:8000:' [Object[]]$SiteObject mysite(){ [void][System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.Web.Administration') [void][System.Reflection.Assembly]::LoadWithPartialName( 'Microsoft.Web.Management') Import-Module IISAdministration,WebAdministration } [void]CreateSite(){ $newsite = @{ Name = $this.SiteName PhysicalPath = $this.PhysPath BindingInformation = $this.Binding } $this.SiteObject += New-IISSite @newsite -Passthru (Get-IISServerManager).CommitChanges() } }</code>As with anything in Powershell or coding in general, there&rsquo;s always more than one way to achieve a goal.  The lesson learned in this experience is that custom classes will always be loaded ahead of the rest of your code.  You can work around this by abstracting your classes to a separate file or &ldquo;library&rdquo; to ensure your code executes in the order you intend.  If you get a TypeNotFound error from a casting call in your class, you can use the code abstraction method or simply recast to a default but similar type.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 16-August-2019</title><link>https://powershell.org/articles/2019-08-16-icymi-powershell-week-of-16-august-2019/</link><guid>https://powershell.org/articles/2019-08-16-icymi-powershell-week-of-16-august-2019/</guid><pubDate>Fri, 16 Aug 2019 15:00:40 +0000</pubDate><description>&lt;p&gt;Topics include Azure setups, AD reporting, IF statements Out-GridView and other new features coming in PowerShell 7.&lt;/p&gt;
&lt;p&gt;Special thanks to James Petty, Mark Rollof, Prasoon Karunan V and Robin Dadswell&lt;/p&gt;
&lt;h3 id="" class="ps-heading"&gt;&lt;a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://www.linkedin.com/pulse/pragmatic-powershell-scripting-chris-sharp/"&gt;&lt;em&gt;Pragmatic PowerShell Scripting - Reporting on AD Groups&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by Chris Sharp on 11th August&lt;/p&gt;
&lt;p&gt;Learn how Chris approached a requirement to pull various reports from AD using PowerShell and a useful Excel module.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Azure setups, AD reporting, IF statements Out-GridView and other new features coming in PowerShell 7.</p><p>Special thanks to James Petty, Mark Rollof, Prasoon Karunan V and Robin Dadswell</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://www.linkedin.com/pulse/pragmatic-powershell-scripting-chris-sharp/"><em>Pragmatic PowerShell Scripting - Reporting on AD Groups</em></a></p><p>by Chris Sharp on 11th August</p><p>Learn how Chris approached a requirement to pull various reports from AD using PowerShell and a useful Excel module.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://powershellexplained.com/2019-08-11-Powershell-if-then-else-equals-operator/"><em>Powershell: Everything you wanted to know about the IF statement</em></a></p><p>by Kevin Marquette on 11th August</p><p>Like many other languages, PowerShell has statements for conditionally executing code in your scripts. One of those statements is the if statement. Today we will take a deep dive into one of the most fundamental commands in PowerShell.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="http://www.thatlazyadmin.com/create-an-azure-storage-account-using-powershell/"><em>Create an Azure Storage account using PowerShell</em></a></p><p>by Shaun Hardneck on 13th August</p><p>In this short post, I will show you how you can create a new Azure Storage Account using PowerShell.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://devblogs.microsoft.com/powershell/out-gridview-returns/"><em>Out-GridView Returns!</em></a></p><p>by Jack Zeiders on 14th August</p><p>It’s been almost 3 years since PowerShell Core debuted for Linux and Mac, and as we’ve increased our cmdlet coverage more and more, one cmdlet has always stood out as a top, cross-platform request. Today, we are excited to announce that Out-GridView is debuting on all Core-supported platforms through the GraphicalTools Module.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://adamtheautomator.com/azure-lab-setup"><em>Automating an Azure Lab Setup with PowerShell</em></a></p><p>by Adam Bertram on 15th August</p><p>Ever wanted to learn how to boot up an entire Lab with a single line of PowerShell, well Adam Bertram can show you how with this post.</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="vscode-resource:/c:/Users/robin/OneDrive%20-%20Dadswell.Net/Software/Stuff%20I%20Have%20Written/repo/PowerShell_Org/WhatYouMissedThisWeek/URL"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a></p><p>Description of Reddit topic</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://twitter.com/Steve_MSFT/status/1161666852914778113"><em>Tweet of the Week</em></a></p><p>Coming in PowerShell 7 Preview.3 is </p><p><code>ForEach-Object -Parallel</code>experimental feature! Easily execute scriptblocks in parallel threads!</p><h3 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p><a href="https://www.youtube.com/watch?v=cK1xenkF9zs"><em>Youtube: PowerShell Community Call - August 15, 2019</em></a></p><p>An overview of upcoming changes, some information and a Q&amp;A session.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 9-August-2019</title><link>https://powershell.org/articles/2019-08-09-icymi-powershell-week-of-9-august-2019/</link><guid>https://powershell.org/articles/2019-08-09-icymi-powershell-week-of-9-august-2019/</guid><pubDate>Fri, 09 Aug 2019 23:00:02 +0000</pubDate><description>&lt;p&gt;Topics include SharePoint, AD trust relationships, Azure File Sync, working with variables and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include SharePoint, AD trust relationships, Azure File Sync, working with variables and more.</p><p>Special thanks to Prasoon Karunan V and Robin Dadswell</p><h6 id="introducing-the-azure-file-sync-dsc-resource-module.wp-block-heading" class="ps-heading"><a href="http://www.powershell.no/powershell,/azure/2019/08/04/azure-filesync-dsc.html"><em>Introducing the Azure File Sync DSC resource module</em></a><a class="ps-heading-anchor" href="#introducing-the-azure-file-sync-dsc-resource-module.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jan Egil Ring on 4th August</p><p>Introduction to a new PowerShell DSC resource module called AzureFileSyncDsc. Including an overview of what Azure File Sync is.</p><h6 id="monitor-web-server-uptime-with-a-powershell-script.wp-block-heading" class="ps-heading"><a href="https://4sysops.com/archives/monitor-web-server-uptime-with-a-powershell-script/"><em>Monitor web server uptime with a PowerShell script</em></a><a class="ps-heading-anchor" href="#monitor-web-server-uptime-with-a-powershell-script.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on 4th August</p><p>There are many different tools to monitor whether a web server is running or not. However, if you and/or your team know PowerShell and, perhaps, already have some PowerShell scripts to manage web services, using PowerShell to monitor uptime may be a good option.</p><h6 id="testing-ldap-and-ldaps-connectivity-with-powershell.wp-block-heading" class="ps-heading"><a href="https://evotec.xyz/testing-ldap-and-ldaps-connectivity-with-powershell/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=testing-ldap-and-ldaps-connectivity-with-powershell"><em>Testing LDAP and LDAPS connectivity with PowerShell</em></a><a class="ps-heading-anchor" href="#testing-ldap-and-ldaps-connectivity-with-powershell.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Przemyslaw Klys on 4th August</p><p>One of the common ways to connect to Active Directory is thru LDAP protocol. There are a lot of applications that talk to AD via LDAP. By default Active Directory has LDAP enabled but that&rsquo;s a bit insecure in today&rsquo;s world. That&rsquo;s where LDAPS comes in. It&rsquo;s not easy to set up, but when you get it done, it works. The problem I had recently is that while setting up LDAPS on DC&rsquo;s I only did this on some of the DC&rsquo;s, and not all of them as I should.</p><h6 id="the-end-all-guide-to-repairing-active-directory-trust-relationships.wp-block-heading" class="ps-heading"><a href="https://adamtheautomator.com/trust-relationship-between-this-workstation-and-the-primary-domain-failed/?fbclid=IwAR1kl9nheqGadf0gk8z1TK8nfXmfaTWIeBQaXndnbIo1j3RdgIl4BQ6ThMA"><em>The End-All Guide to Repairing Active Directory Trust Relationships</em></a><a class="ps-heading-anchor" href="#the-end-all-guide-to-repairing-active-directory-trust-relationships.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on 6th August</p><p>Once the most common problems that plagues Windows system administrators is trusted, Active Directory computers seemingly fall off the domain. In this guide, you&rsquo;re going to learn every trick I&rsquo;ve come across in my 20+ years managing Active Directory and how to automate it with PowerShell.</p><h6 id="modify-the-quick-launch-in-sharepoint-online-sites-using-powershell-pnp.wp-block-heading" class="ps-heading"><a href="https://veronicageek.com/office-365/sharepoint-online/modify-the-quick-launch-in-sharepoint-online-sites-using-powershell-pnp/2019/08/"><em>Modify the Quick Launch in SharePoint Online sites using PowerShell PnP</em></a><a class="ps-heading-anchor" href="#modify-the-quick-launch-in-sharepoint-online-sites-using-powershell-pnp.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Veronique Lengelle on 7th August</p><p>There are some useful cmdlets in the SharePoint PowerShell PnP module that one wouldn’t think about using, but coupled with a set of other cmdlets, they can be very useful!</p><h6 id="reddit-rpowershell---most-popular-weekly-post.wp-block-heading" class="ps-heading"><a href="https://www.reddit.com/r/PowerShell/comments/cmgs6o/reverse_engineering_powershell_malware/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Reverse engineering powershell malware</p><h6 id="youtube-working-with-powershell-variables.wp-block-heading" class="ps-heading"><a href="https://www.youtube.com/watch?v=4Rc0aEMXiWw"><em>Youtube: Working With PowerShell Variables</em></a><a class="ps-heading-anchor" href="#youtube-working-with-powershell-variables.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Learn how to use and work with PowerShell variables. See different PowerShell variable types, and how to identify them. Learn how to get a list of PowerShell constant and environment variables.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 2-August-2019</title><link>https://powershell.org/articles/2019-08-02-icymi-powershell-week-of-2-august-2019/</link><guid>https://powershell.org/articles/2019-08-02-icymi-powershell-week-of-2-august-2019/</guid><pubDate>Fri, 02 Aug 2019 15:00:45 +0000</pubDate><description>&lt;p&gt;Topics include data aggregation, file permission migrations, checking reboots in the registry, credential management, default parameters and setting up for PowerShell Development.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include data aggregation, file permission migrations, checking reboots in the registry, credential management, default parameters and setting up for PowerShell Development.</p><p>Special thanks to Prasoon Karunan V and Robin Dadswell</p><h6 id="aggregating-data-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190802.MD#aggregating-data-with-powershell"/><a href="https://jesspomfret.com/powershell-aggregation/"><em>Aggregating Data with PowerShell</em></a><a class="ps-heading-anchor" href="#aggregating-data-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jess Pomfret on July 26th</p><p>For DBAs aggregation of data is a given, but how do we do that in PowerShell? Find out with Jess&rsquo; look into ways to do it.</p><h6 id="transferring-file-permissions-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190802.MD#transferring-file-permissions-with-powershell"/><a href="https://adamtheautomator.com/transfer-file-permissions/"><em>Transferring File Permissions with PowerShell</em></a><a class="ps-heading-anchor" href="#transferring-file-permissions-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on July 26th</p><p>Maintaining file share permissions across servers can be a major challenge but by using PowerShell, we can automate this process allowing you to go home early.</p><h6 id="how-to-check-for-a-pending-reboot-in-the-registry-windows" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190802.MD#how-to-check-for-a-pending-reboot-in-the-registry-windows"/><a href="https://adamtheautomator.com/pending-reboot-registry-windows/"><em>How to Check for a Pending Reboot in the Registry (Windows)</em></a><a class="ps-heading-anchor" href="#how-to-check-for-a-pending-reboot-in-the-registry-windows" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on July 28th</p><p>Whenever you install software, updates or make configuration changes, it&rsquo;s common for Windows to need a reboot. Many OS tasks sometimes force Windows to require a reboot. When a reboot is pending, Windows add some registry values to show that. In this blog post, you&rsquo;re going to learn how to check for a pending reboot and how to build a PowerShell script to automate the task.</p><h6 id="credential-management-module" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190802.MD#credential-management-module"/><a href="https://www.mosaicmk.com/2019/07/credential-management-module.html"><em>Credential Management Module</em></a><a class="ps-heading-anchor" href="#credential-management-module" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by MosaicMK Software on July 30th</p><p>Manage credentials saved to the windows credential manager and call them as clear text or a PSCredential object to be used by other PowerShell Commends</p><h6 id="whats-in-your-powershell-psdefaultparametervalues-preference-variable" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190802.MD#whats-in-your-powershell-psdefaultparametervalues-preference-variable"/><a href="https://mikefrobbins.com/2019/08/01/whats-in-your-powershell-psdefaultparametervalues-preference-variable/"><em>What’s in your PowerShell $PSDefaultParameterValues Preference Variable?</em></a><a class="ps-heading-anchor" href="#whats-in-your-powershell-psdefaultparametervalues-preference-variable" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mike F Robbins on August 1st</p><p>An view into Mike&rsquo;s use of a powerful preference variable added in PowerShell version 3.0.</p><h6 id="youtube-getting-setup-for-powershell-development" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190802.MD#youtube-getting-setup-for-powershell-development"/><a href="https://www.youtube.com/watch?v=4-L7HwLgsf4"><em>Youtube: Getting setup for PowerShell Development</em></a><a class="ps-heading-anchor" href="#youtube-getting-setup-for-powershell-development" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Learn how to configure and setup your computer for PowerShell Development. In this fourth episode of Learn PowerShell you learn to start coding PowerShell daily with a few free components and easy configuration. Follow along with this video for an easy step-by-step walk-through for getting setup to start writing PowerShell.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 26-July-2019</title><link>https://powershell.org/articles/2019-07-26-icymi-powershell-week-of-26-july-2019/</link><guid>https://powershell.org/articles/2019-07-26-icymi-powershell-week-of-26-july-2019/</guid><pubDate>Fri, 26 Jul 2019 15:00:09 +0000</pubDate><description>&lt;p&gt;Topics include an in-depth tutorial, extending PS with Rust, mail archives, and Pester reports.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include an in-depth tutorial, extending PS with Rust, mail archives, and Pester reports.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="powershell-tutorial-mini-course-building-a-server-inventory-script" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#powershell-tutorial-mini-course-building-a-server-inventory-script"/><a href="https://adamtheautomator.com/powershell-tutorial-mini-course/"><em>PowerShell Tutorial Mini-Course: Building a Server Inventory Script</em></a><a class="ps-heading-anchor" href="#powershell-tutorial-mini-course-building-a-server-inventory-script" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on July 22nd</p><p>Stepping from one-liners to a full script can be a daunting threshold. Fortunately, Adam has a great tutorial that walks you through his thought-process behind piecing together a reusable tool.</p><h6 id="extending-powershell-with-rust" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#extending-powershell-with-rust"/><a href="https://dfinke.github.io/powershell/2019/07/21/Extending-PowerShell-with-Rust.html"><em>Extending PowerShell with Rust</em></a><a class="ps-heading-anchor" href="#extending-powershell-with-rust" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Doug Finke on July 21st</p><p>Need to squeeze more performance out of your PowerShell but the thought of writing C# isn&rsquo;t sitting well with you? Well, how about Rust?</p><h6 id="mission-impossible-code-part-2-extreme-multilingual-iac-via-standard-code-for-preflight-tcp-connect-testing-a-list-of-endpoints-in-both-bash-and-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#mission-impossible-code-part-2-extreme-multilingual-iac-via-standard-code-for-preflight-tcp-connect-testing-a-list-of-endpoints-in-both-bash-and-powershell"/><a href="https://cloudywindows.io/post/mission-impossible-code-part-2-extreme-multilingual-iac-via-standard-code-for-preflight-tcp-connect-testing-a-list-of-endpoints-in-both-bash-and-powershell/"><em>Mission Impossible Code Part 2: Extreme Multilingual IaC (via Standard Code for Preflight TCP Connect Testing a List of Endpoints in Both Bash and PowerShell)</em></a><a class="ps-heading-anchor" href="#mission-impossible-code-part-2-extreme-multilingual-iac-via-standard-code-for-preflight-tcp-connect-testing-a-list-of-endpoints-in-both-bash-and-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Darwin Sanoy on July 23rd</p><p>Join Darwin&rsquo;s trip down the rabbit hole of working out a xplat method for validating critical network connectivity before onboarding new systems.</p><h6 id="disconnect-migrate-and-reconnect-your-pst-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#disconnect-migrate-and-reconnect-your-pst-with-powershell"/><a href="http://www.systanddeploy.com/2019/07/disconnect-migrate-and-reconnect-your.html"><em>Disconnect, migrate and reconnect your PST with PowerShell</em></a><a class="ps-heading-anchor" href="#disconnect-migrate-and-reconnect-your-pst-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Damien Van Robaeys on July 23rd</p><p>I&rsquo;ve long believed that PSTs are the handiwork of Satan but they&rsquo;re often a necessary evil that we endure. Fortunately, locating and migrating them is a snap with Damien&rsquo;s script.</p><h6 id="pester-result-reporting-with-suggestions-and-xsl-support" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#pester-result-reporting-with-suggestions-and-xsl-support"/><a href="https://www.powershellmagazine.com/2019/07/25/pester-result-reporting-with-suggestions-and-xsl-support/"><em>Pester Result Reporting With Suggestions And XSL Support</em></a><a class="ps-heading-anchor" href="#pester-result-reporting-with-suggestions-and-xsl-support" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Prasoon Karunan V on July 25rd</p><p>Desiring nicer looking test results, Prasoon extends Pester, allowing it to generate browser-friendly reports.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#tweet-of-the-week"/><a href="https://twitter.com/MiladMSFT/status/1152222809747329024?s=20"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>It&rsquo;s always cool to see what new PowerShell tools the InfoSec community comes up with. ThreatHunt simulates attack methods by raising alerts for you to practice hunting down.</p><h6 id="youtube-powershell-and-selenium" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190726.md#youtube-powershell-and-selenium"/><a href="https://www.youtube.com/watch?v=A6ZKzLN2CDs"><em>Youtube: Powershell and Selenium</em></a><a class="ps-heading-anchor" href="#youtube-powershell-and-selenium" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Presenting at the St. Louis User Group, Ken Maglio covers everything you need to know to start automating Chrome with the help of Selenium.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 17-July-2019</title><link>https://powershell.org/articles/2019-07-19-icymi-powershell-week-of-17-july-2019/</link><guid>https://powershell.org/articles/2019-07-19-icymi-powershell-week-of-17-july-2019/</guid><pubDate>Fri, 19 Jul 2019 16:22:40 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell 7, Ubiquiti APIs, Chocolatey, and DSC.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell 7, Ubiquiti APIs, Chocolatey, and DSC.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="accessing-your-ubiquiti-unifi-network-configuration-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#accessing-your-ubiquiti-unifi-network-configuration-with-powershell"/><a href="https://blog.darrenjrobinson.com/accessing-your-ubiquiti-unifi-network-configuration-with-powershell/"><em>Accessing your Ubiquiti Unifi network configuration with PowerShell</em></a><a class="ps-heading-anchor" href="#accessing-your-ubiquiti-unifi-network-configuration-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Darren Robinson on July 15th</p><p>Ubiquiti is a popular choice for budget-conscious techies and Darren demonstrates how you can start pulling useful information out of your network with their REST API.</p><h6 id="powershell-scripting-techniques-and-gems--part-1" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#powershell-scripting-techniques-and-gems--part-1"/><a href="https://www.tech-savvy.nl/2019/07/16/powershell-scripting-techniques-and-gems-part-1/"><em>PowerShell Scripting Techniques and Gems – Part 1</em></a><a class="ps-heading-anchor" href="#powershell-scripting-techniques-and-gems--part-1" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Martijn van Geffen on July 16th</p><p>Are you familiar with the</p><p><code>Where</code>method? It&rsquo;s a feature of collections that not many people are aware of, and Martijn does a nice dive into its usage and performance.</p><h6 id="introducing-the-chocolatey-remote-management-powershell-gui" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#introducing-the-chocolatey-remote-management-powershell-gui"/><a href="https://winsysblog.com/2019/07/introducing-the-chocolatey-remote-management-powershell-gui.html"><em>Introducing the Chocolatey Remote Management PowerShell GUI</em></a><a class="ps-heading-anchor" href="#introducing-the-chocolatey-remote-management-powershell-gui" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Dan Franciscus on July 16th</p><p>Dan shows a handy GUI tool that his helpdesk can use for assistance in remote Chocolatey management. Code available on GitHub.</p><h6 id="how-to-create-archive-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#how-to-create-archive-with-powershell"/><a href="http://blog.senktas.net/2019/07/15/how-to-create-archive-with-powershell/"><em>How to create archive with PowerShell?</em></a><a class="ps-heading-anchor" href="#how-to-create-archive-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Robert Senktas on July 15th</p><p>Robert explores the relative performance of</p><p><code>Compress-Archive</code>versus directly calling .NET.</p><h6 id="diagnosing-common-windows-problems-with-powershell-troubleshooting-packs" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#diagnosing-common-windows-problems-with-powershell-troubleshooting-packs"/><a href="http://techgenix.com/powershell-troubleshooting-packs/"><em>Diagnosing Common Windows Problems With PowerShell Troubleshooting Packs</em></a><a class="ps-heading-anchor" href="#diagnosing-common-windows-problems-with-powershell-troubleshooting-packs" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brien Posey on July 15th</p><p>It never hurts to have an extra tool in your bag of tricks, so if you&rsquo;re supporting Windows 10 you could give these troubleshooting packs a whirl with PowerShell.</p><h6 id="desired-state-configuration-dsc--configuration-data" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#desired-state-configuration-dsc--configuration-data"/><a href="https://nedimmehic.org/2019/07/18/desired-state-configuration-dsc-configuration-data/"><em>Desired State Configuration (DSC) – Configuration Data</em></a><a class="ps-heading-anchor" href="#desired-state-configuration-dsc--configuration-data" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Nedim Mehic on July 18th</p><p>In part 3 of this series, Nedim takes a deep dive into DSC configuration data, covering some less obvious details and pointing out pitfalls to avoid.</p><h6 id="powershell-7-preview-2" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190719.md#powershell-7-preview-2"/><a href="https://github.com/PowerShell/PowerShell/releases/tag/v7.0.0-preview.2"><em>PowerShell 7 Preview 2</em></a><a class="ps-heading-anchor" href="#powershell-7-preview-2" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Preview 2 of PS v7 has been released. Get it. Play with it. Break it. Send feedback.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 12-July-2019</title><link>https://powershell.org/articles/2019-07-12-icymi-powershell-week-of-12-july-2019/</link><guid>https://powershell.org/articles/2019-07-12-icymi-powershell-week-of-12-july-2019/</guid><pubDate>Fri, 12 Jul 2019 15:00:20 +0000</pubDate><description>&lt;p&gt;Topics include WPF GUIs, BitLocker and LAPS reporting, more APIs, and tips from a consultant.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include WPF GUIs, BitLocker and LAPS reporting, more APIs, and tips from a consultant.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="heading" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190712.md#tutorial-creating-extensive-powershell-gui-applications--part-1"/><a href="https://domruggeri.com/2019/07/06/creating-extensive-powershell-gui-applications-part-1/"><em>[Tutorial] Creating Extensive PowerShell GUI Applications – PART 1</em></a><a class="ps-heading-anchor" href="#heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Dom Ruggeri on July 6th</p><p>For those interested in dipping their toes into creating GUIs with PowerShell, Dom has started a great series covering his approach to keeping the GUI elements organized and wiring them up to some code.</p><h6 id="managing-the-ghost-api-with-powershell-oh-the-possibilities" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190712.md#managing-the-ghost-api-with-powershell-oh-the-possibilities"/><a href="https://adamtheautomator.com/psghost-automate-your-ghost-blog-with-powershell/"><em>Managing the Ghost API with PowerShell: Oh the Possibilities!</em></a><a class="ps-heading-anchor" href="#managing-the-ghost-api-with-powershell-oh-the-possibilities" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on July 11th</p><p>Perhaps to celebrate migrating his blog to the Ghost platform, Adam explores how to work with the service&rsquo;s REST API via PowerShell.</p><h6 id="getting-bitlocker-and-laps-summary-report-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190712.md#getting-bitlocker-and-laps-summary-report-with-powershell"/><a href="https://evotec.xyz/getting-bitlocker-and-laps-summary-report-with-powershell/"><em>Getting Bitlocker and LAPS summary report with PowerShell</em></a><a class="ps-heading-anchor" href="#getting-bitlocker-and-laps-summary-report-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Przemyslaw Klys on July 11th</p><p>Need a presentable report for management? This fun script will put one in your hands. Or, take some time to poke at it and learn some cool new tricks with collecting data.</p><h6 id="3-ways-to-create-custom-typenames-on-powershell-objects" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190712.md#3-ways-to-create-custom-typenames-on-powershell-objects"/><a href="https://ridicurious.com/2019/07/11/3-ways-to-create-custom-typenames-in-powershell/"><em>3 Ways to Create Custom TypeNames on PowerShell Objects</em></a><a class="ps-heading-anchor" href="#3-ways-to-create-custom-typenames-on-powershell-objects" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Prateek Singh on July 11th</p><p>If you&rsquo;re using the</p><p><code>types.ps1xml</code>to format how your objects are displayed, here are a few different ways to define your object typename.</p><h6 id="quantum-computing-with" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190712.md#quantum-computing-with-powershell"/><a href="https://github.com/microsoft/Quantum/tree/master/Chemistry/GetGateCount"><em>Quantum Computing with&hellip; PowerShell?</em></a><a class="ps-heading-anchor" href="#quantum-computing-with" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Quantum chemistry your thing? We stumbled across a portion of MS&rsquo;s Quantum Development Kit that integrates a little functionality with our favorite language.</p><h6 id="youtube-lessons-from-the-field-how-an-it-consultant-uses-powershell-to-get-the-job-done-with-david-stein" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190712.md#youtube-lessons-from-the-field-how-an-it-consultant-uses-powershell-to-get-the-job-done-with-david-stein"/><a href="https://www.youtube.com/watch?v=vAcQzjKcfrM"><em>Youtube: Lessons from the field: How an IT consultant uses PowerShell to get the job done with David Stein</em></a><a class="ps-heading-anchor" href="#youtube-lessons-from-the-field-how-an-it-consultant-uses-powershell-to-get-the-job-done-with-david-stein" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Presenting to the Research Triangle PowerShell User Group, David gives a glimpse into how PS has changed the landscape of his job as a consultant.</p>]]></content:encoded></item><item><title>Quick ProTip: Negotiate TLS Connections In Powershell With A Minimum TLS Version Requirement</title><link>https://powershell.org/articles/2019-07-08-quick-protip-negotiate-tls-connections-in-powershell-with-a-minimum-tls-version-requirement/</link><guid>https://powershell.org/articles/2019-07-08-quick-protip-negotiate-tls-connections-in-powershell-with-a-minimum-tls-version-requirement/</guid><pubDate>Mon, 08 Jul 2019 21:28:23 +0000</pubDate><description>&lt;h2 id="synopsis.wp-block-heading" class="ps-heading"&gt;Synopsis&lt;a class="ps-heading-anchor" href="#synopsis.wp-block-heading" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;This is a quick post to highlight the nuances of Powershell and protocol management in regard to TLS connections. If you&amp;rsquo;ve ever attempted to make a secure connection (for example, an API request) to a service with certain net security requirements, you might have run into this problem.&lt;/p&gt;
&lt;p&gt;While TLS is negotiated at the highest level existing on both the server and the client, the minimum protocols defined by Powershell may include ones that you explicitly do not want. While explicitly declaring an enumerated protocol list is easy enough, what happens when Tls13 becomes more common, and we want to start utilizing it when it&amp;rsquo;s available? Then Tls14, and beyond?&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<h2 id="synopsis.wp-block-heading" class="ps-heading">Synopsis<a class="ps-heading-anchor" href="#synopsis.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>This is a quick post to highlight the nuances of Powershell and protocol management in regard to TLS connections. If you&rsquo;ve ever attempted to make a secure connection (for example, an API request) to a service with certain net security requirements, you might have run into this problem.</p><p>While TLS is negotiated at the highest level existing on both the server and the client, the minimum protocols defined by Powershell may include ones that you explicitly do not want. While explicitly declaring an enumerated protocol list is easy enough, what happens when Tls13 becomes more common, and we want to start utilizing it when it&rsquo;s available? Then Tls14, and beyond?</p><p>Surely there&rsquo;s a way to give both a minimum version and account for newer protocols once they become available.</p><h2 id="retrieving-and-configuring-tls.wp-block-heading" class="ps-heading">Retrieving and Configuring TLS<a class="ps-heading-anchor" href="#retrieving-and-configuring-tls.wp-block-heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>The first thing we&rsquo;ll want to do is figure out what the default security protocol for our system is, and what all versions are supported. To do this, we leverage the .NET method</p><p><code>[Net.ServicePointManager]::SecurityProtocol</code>.</p><p><code>PS&gt; [Net.ServicePointManager]::SecurityProtocol SystemDefault</code>On my Windows 10 system with Powershell v5.1, this returns a value of</p><p><code>SystemDefault</code>. This value was introduced in .NET 4.7 (prior versions of .NET return no default value, only an enumerated list), and allows your operating system to pick the protocol to best negotiate the connection with. Under normal circumstances, this would be the best option to use, as defaults change based on the current security landscape.</p><p>However, </p><p><code>SystemDefault</code>might be a bit too lenient in it&rsquo;s declared available protocols. SSLv3?! - yeah, </p><p><a href="https://disablessl3.com/">no thanks</a>.</p><p>We can see the default available protocols with the following:</p><p><code>PS&gt; [enum]::GetValues('Net.SecurityProtocolType') SystemDefault Ssl3 Tls Tls11 Tls12 Tls13</code>Changing the protocol list is a fairly straight forward command:</p><p><code>[System.Net.ServicePointManager]::SecurityProtocol = 'Tls11, Tls12'</code>This would declare Tls 1.1 and 1.2 all valid protocols to use. As long as those are present on your computer, this works perfectly fine, and I&rsquo;ve seen this method used a lot. This will accomplish our goal of setting a minimum required security protocol.</p><p>Herein lies the nuance of what we&rsquo;re trying to accomplish. While TLS is negotiated at the highest level existing on both the server and the client, the minimum protocols defined in</p><p><code>SystenDefault</code>may include ones that you explicitly do not want. If Tls protocols are explicitly defined, we&rsquo;d need to update our code whenever a new protocol became available. This might be preferable in certain circumstances where you need exact control over how your application communicates, but for my use case, I want this to be a dynamic declaration.</p><p>It turns out that adding support for newer available protocols on a client machine is fairly easy to implement.</p><p><code>PS&gt; $CurrentVersionTls = [Net.ServicePointManager]::SecurityProtocol PS&gt; $AvailableTls = [enum]::GetValues('Net.SecurityProtocolType') | Where-Object { $_ -ge 'Tls12' } PS&gt; $AvailableTls.ForEach({ [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor $_ }) PS&gt; [Net.ServicePointManager]::SecurityProtocol Tls12, Tls13</code>What we&rsquo;ve done here is enumerated all available protocols on our computer and declared everything above Tls12 as fit for negotiation. This allows us to be able to both specify a minimum, and include newer protocols once they are available - effectively leveraging the best of</p><p><code>SystemDefault</code>and explicit declarations.</p><p>As a courtesy to your users, I would recommend setting the security protocol back to the way it was once your connection or request is finished.</p><p><code># Be nice and set session security protocols back to how we found them. [Net.ServicePointManager]::SecurityProtocol = $currentVersionTls</code>Happy (secure) shelling!</p><p>Note: This is a cross-post of my original blog post here:</p><p><a href="https://www.natelab.us/quick-protip-negotiate-tls-in-powershell/">https://www.natelab.us/quick-protip-negotiate-tls-in-powershell/</a></p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 5-July-2019</title><link>https://powershell.org/articles/2019-07-05-icymi-powershell-week-of-5-july-2019/</link><guid>https://powershell.org/articles/2019-07-05-icymi-powershell-week-of-5-july-2019/</guid><pubDate>Fri, 05 Jul 2019 15:00:08 +0000</pubDate><description>&lt;p&gt;Topics include pop-ups, dbatools, unit testing galore, and chatops.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include pop-ups, dbatools, unit testing galore, and chatops.</p><p>Curated by Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="get-pwshupdates-check-if-there-is-a-powershell-update-available-and-install-it" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190705.md#get-pwshupdates-check-if-there-is-a-powershell-update-available-and-install-it"/><a href="https://4bes.nl/2019/06/30/get-pwshupdates-check-if-there-is-a-powershell-update-available-and-install-it/"><em>Get-PwshUpdates: Check if there is a PowerShell update available and install it</em></a><a class="ps-heading-anchor" href="#get-pwshupdates-check-if-there-is-a-powershell-update-available-and-install-it" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Barbara Forbes on June 30th</p><p>Life happening and you forgot that there&rsquo;s an update for PS Core? Thankfully, Barbara has put together a module to remind you of when there&rsquo;s a new version available for download and lets you install it with a click.</p><h6 id="how-to-show-a-pop-up-or-balloon-tip-notification-from-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190705.md#how-to-show-a-pop-up-or-balloon-tip-notification-from-powershell"/><a href="http://woshub.com/popup-notification-powershell/"><em>How to Show a Pop-Up or Balloon Tip Notification from PowerShell?</em></a><a class="ps-heading-anchor" href="#how-to-show-a-pop-up-or-balloon-tip-notification-from-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>July 2nd</p><p>If you need a way to notify your end users when a script completes or otherwise quickly communicate to their desktop, this post runs you through a couple of methods to achieve the task.</p><h6 id="unit-testing-in-powershell-introduction-to-pester" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190705.md#unit-testing-in-powershell-introduction-to-pester"/><a href="https://dev.to/omiossec/unit-testing-in-powershell-introduction-to-pester-1de7"><em>Unit testing in PowerShell, introduction to Pester</em></a><a class="ps-heading-anchor" href="#unit-testing-in-powershell-introduction-to-pester" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Olivier Miossec on July 2nd</p><p>The foundations of Pester laid bare, Olivier brings everyone a great first step into the world of unit testing.</p><h6 id="hiding-warnings-in-dbatools" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190705.md#hiding-warnings-in-dbatools"/><a href="https://nocolumnname.blog/2019/06/28/hiding-warnings-in-dbatools/"><em>Hiding Warnings in dbatools</em></a><a class="ps-heading-anchor" href="#hiding-warnings-in-dbatools" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Shane O’Neill on June 28th</p><p>Error handling is a great notch to have on your belt but if you&rsquo;re working with dbatools, there are a few special considerations that are worth knowing.</p><h6 id="youtube-chatops-and-bots-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190705.md#youtube-chatops-and-bots-with-powershell"/><a href="https://www.youtube.com/watch?v=8a4kAe766F4"><em>Youtube: ChatOps and Bots with PowerShell!</em></a><a class="ps-heading-anchor" href="#youtube-chatops-and-bots-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From PSConfEU, Steve Lee runs you through the benefits of ChatOps and demonstrates how to build your first PowerShell chat bot.</p><h6 id="twitch-powershell-101-with-michael-and-christian---part-13_" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190705.md#twitch-powershell-101-with-michael-and-christian---part-13_"/><a href="https://www.twitch.tv/videos/447586518">Twitch: PowerShell 101 with Michael and Christian - Part 13_</a><a class="ps-heading-anchor" href="#twitch-powershell-101-with-michael-and-christian---part-13_" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From the Brisbane user group, Michael continues a learning series with some work in PS Core.</p>]]></content:encoded></item><item><title>A Farewell, and a Bunch of Hellos</title><link>https://powershell.org/articles/2019-07-01-a-farewell-and-a-bunch-of-hellos/</link><guid>https://powershell.org/articles/2019-07-01-a-farewell-and-a-bunch-of-hellos/</guid><pubDate>Mon, 01 Jul 2019 13:55:37 +0000</pubDate><description>&lt;p&gt;As many of you know, The DevOps Collective recently concluded its 7th US event, PowerShell + DevOps Global Summit 2019 in Bellevue, WA. Head to the &lt;a href="http://youtube.com/powershellorg"&gt;organization&amp;rsquo;s YouTube page&lt;/a&gt; for the breakout session recordings, which are live.&lt;/p&gt;
&lt;p&gt;I mentioned going into it that this Summit would be bittersweet for me, as it&amp;rsquo;s the last one I&amp;rsquo;ll be directly involved with. My career&amp;rsquo;s simply taking me in a new direction, and it&amp;rsquo;s much less connected to the day-to-day of technology and more connected with business leadership and strategy. I&amp;rsquo;ll also be stepping back from my involvement with PowerShell.org, and I will not receive a Microsoft MVP Award for this cycle (I&amp;rsquo;m proud to be one of the few who earned 15 consecutive awards, so I&amp;rsquo;ve zero complaints, and this is entirely in line with my expectations). I&amp;rsquo;m stepping back from the &amp;ldquo;Month of Lunches&amp;rdquo; and other technical books as well, although I&amp;rsquo;ve still got plenty of writing in me (many of my &lt;a href="http://leanpub.com/u/donjones"&gt;Leanpub books&lt;/a&gt; are &amp;ldquo;pay what you think they&amp;rsquo;re worth and remember I&amp;rsquo;ve got a mortgage&amp;rdquo;). I&amp;rsquo;m going to remain titular President for the DevOps Collective for a year or so while we get all the legal stuff lined up, but I won&amp;rsquo;t be involved in day-to-day activities. I’ll drop a note later this week on &lt;a href="http://donjones.com"&gt;DonJones.com&lt;/a&gt; about what’s happening with all “my” stuff.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As many of you know, The DevOps Collective recently concluded its 7th US event, PowerShell + DevOps Global Summit 2019 in Bellevue, WA. Head to the<a href="http://youtube.com/powershellorg">organization&rsquo;s YouTube page</a> for the breakout session recordings, which are live.</p><p>I mentioned going into it that this Summit would be bittersweet for me, as it&rsquo;s the last one I&rsquo;ll be directly involved with. My career&rsquo;s simply taking me in a new direction, and it&rsquo;s much less connected to the day-to-day of technology and more connected with business leadership and strategy. I&rsquo;ll also be stepping back from my involvement with PowerShell.org, and I will not receive a Microsoft MVP Award for this cycle (I&rsquo;m proud to be one of the few who earned 15 consecutive awards, so I&rsquo;ve zero complaints, and this is entirely in line with my expectations). I&rsquo;m stepping back from the &ldquo;Month of Lunches&rdquo; and other technical books as well, although I&rsquo;ve still got plenty of writing in me (many of my<a href="http://leanpub.com/u/donjones">Leanpub books</a> are &ldquo;pay what you think they&rsquo;re worth and remember I&rsquo;ve got a mortgage&rdquo;). I&rsquo;m going to remain titular President for the DevOps Collective for a year or so while we get all the legal stuff lined up, but I won&rsquo;t be involved in day-to-day activities. I’ll drop a note later this week on<a href="http://donjones.com">DonJones.com</a> about what’s happening with all “my” stuff.</p><p>It&rsquo;s worth noting that the<em>entire</em> original team for PowerShell.org has now stepped back from daily management of the organization, with only one person remaining active via our new Board. I take that as a huge compliment, and it&rsquo;s something I&rsquo;m proud of - we all wanted to build something we could hand off, and that a &ldquo;next generation&rdquo; could do even better with. And they are. The new team is amazing. They ran the 2019 Summit essentially on their own, just asking a question now and then - something they&rsquo;ll still be welcome to do as they move forward.</p><p>So with that in mind, let&rsquo;s meet them.</p><h2 id="the-board" class="ps-heading wp-block-heading">The Board<a class="ps-heading-anchor" href="#the-board" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>The main point of the Board is to provide a semiannual sounding board for the CEO of the organization, and that requires broad, diverse perspectives. They&rsquo;re also the legal backstop for the organization, and can replace corporate officers. They can expand or contract the Board size as needed (within legal guardrails) and confirm their own members. I think we&rsquo;ve lined up a great group of volunteers:</p><p>**Michael Bender<br>
** Michael&rsquo;s run The Krewe event at TechEd/Ignite for years, and been a huge community supporter. His experience will provide an invaluable perspective to the incoming officers.</p><p>**Jeffrey Hicks<br>
** Jeff&rsquo;s been a collaborator of mine since the VBScript days, and was one of the original PowerShell.org founders.</p><p>**Melissa Jones<br>
** Melissa joined us for our first OnRamp track, and she&rsquo;ll be a voice for the entry-level folks we&rsquo;re trying to offer support to. She&rsquo;s a database administrator, introverted multipotentialite, and avid reader who likes solving problems and figuring out how things work.</p><p><strong>Paula Kingsley</strong><br>
Paula has been with Summit pretty much since the beginning, and recently co-starred as an Iron Scripter judge. She&rsquo;s a long-running PowerShell enthusiast and a real IT expert.</p><p>**Rob Reynolds<br>
** Rob runs Chocolatey, and he&rsquo;s been a big Summit supporter for years. His perspective as a business in our space will be a truly valuable one as we try to further engage a broader community.</p><p>**Bonnie Runimas<br>
** Bonnie&rsquo;s been with Summit since Year 1, and helps run a successful user group in Chicago. She&rsquo;ll provide valuable input on how the organization can help groups like hers across the world.</p><h2 id="the-team" class="ps-heading wp-block-heading">The Team<a class="ps-heading-anchor" href="#the-team" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>These volunteers run the organization&rsquo;s day-to-day functions:</p><p><strong>Jeffrey Bernt</strong> runs logistics for events, including Summit and DevOps Camp.</p><p><strong>Missy Januszko &amp; Warren Frame</strong> will once again be our co-directors of content for both PowerShell + DevOps Summit as well at our new DevOps + Automation Summit in Nashville TN.</p><p><strong>Mike Kanakos</strong> will be joining the team as our Director of Community Engagement. He will mainly be focusing on engaging with PowerShell user groups and helping with PowerShell / Automation Saturdays.</p><p><strong>Tim Warner</strong> is heading up the new OnRamp program, handling all the entry-level education at PowerShell + DevOps Global Summit.</p><p><strong>Rob Pleau</strong> is running the Scholarship aspect of OnRamp, and will coordinate the process of getting new blood into the community.</p><p><strong>Mark Roloff , Robin Dadswell,</strong> and<strong>Prasoon Karunan V</strong> continue to run the &ldquo;<a href="https://powershell.org/category/powershell-admins/">In Case You Missed It</a>&rdquo; (ICYMI) weekly posts.</p><p>Our Forums continue to be moderated by<strong>James Ruskin, Alexander Wittig, Prasoon Karunan V</strong>, and<strong>Wes Stahler</strong>.</p><p><strong>Harjit Dhaliwal</strong> runs the organization&rsquo;s Social Media accounts, including<a href="https://twitter.com/pshorg">@PshOrg</a> ,<a href="https://twitter.com/pshsummit">@PSHSummit</a> , and<a href="https://twitter.com/devopsorg">@DevOpsOrg</a></p><p><strong>Tommy Maynard</strong> will also continue to be a contributing writer to PowerShell.org.</p><h2 id="the-officers" class="ps-heading wp-block-heading"><strong>The Officers</strong><a class="ps-heading-anchor" href="#the-officers" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Finally, these are the people who are legally accountable for the organization. As I&rsquo;ve mentioned, I&rsquo;ll remain as President for some time as we work through the legal paperwork. Also, for the first time, we&rsquo;ll have a paid CEO. As the organization launches new events (Automation + DevOps Summit 2020 in Nashville, new Automation Saturday events, and more), this is just a full-time job, and having someone in that role gives the organization both flexibility and stability.</p><p><strong>James Petty</strong> will be that CEO, also formally serving as Vice-President and Treasurer. I anticipate James formally stepping into the President role in the future, and we&rsquo;ll need to replace both the Vice-President and Treasurer roles to make that happen. Those will remain volunteer, with the Treasurer&rsquo;s primary job being interfacing with our professional accounting firm.</p><p><strong>Warren Frame</strong> will step in as Secretary, our fourth legally mandated corporate officer (Nevada permits the Vice-President to hold a dual role, which is what James will do for now).</p><h2 id="so-thats-all-folks" class="ps-heading wp-block-heading">So That&rsquo;s All, Folks<a class="ps-heading-anchor" href="#so-thats-all-folks" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>So that&rsquo;s the new team. I strongly encourage you to connect with them on Twitter and GitHub, and lend them your help whenever you can.</p><p>In closing, I just want to tell you what an awesome, amazing, kind, supportive group of people you all are. I&rsquo;ve been doing the PowerShell &rsquo;thang&rsquo; for 13+ years, and my career as an IT Ops guy goes back to the mid-1990s. For much of that time, you&rsquo;ve supported me by buying books, coming to conferences, signing up for classes, and (and this really is the bit that helped) just telling me &ldquo;thank you.&rdquo; Well, thank<em>you,</em> because it&rsquo;s been amazing. I&rsquo;m looking forward to the next chapter in my career, and I hope I&rsquo;ll still run into some of you from time to time. If they ask, I&rsquo;ll definitely come up with a session for Summit, if for no other reason than so Chris and I can come hang out with you and all of our other friends for a day or two.</p><p>Again, thank you.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 28-June-2019</title><link>https://powershell.org/articles/2019-06-28-icymi-powershell-week-of-28-june-2019/</link><guid>https://powershell.org/articles/2019-06-28-icymi-powershell-week-of-28-june-2019/</guid><pubDate>Fri, 28 Jun 2019 17:29:40 +0000</pubDate><description>&lt;p&gt;Topics include working with ARM templates, shells, shells, shells, and DSC.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include working with ARM templates, shells, shells, shells, and DSC.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="garuda--architecture-and-plan" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#garuda--architecture-and-plan"/><a href="https://www.powershellmagazine.com/2019/06/24/garuda-architecture-and-plan/"><em>Garuda – Architecture and Plan</em></a><a class="ps-heading-anchor" href="#garuda--architecture-and-plan" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Ravikanth Chaganti on June 24th</p><p>Looking to develop a new OVF, Ravikanth details the his proposed architecture for Garuda, as was demonstrated at PSConfEU.</p><h6 id="how-to-modify-azure-arm-templates-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#how-to-modify-azure-arm-templates-with-powershell"/><a href="https://mcpmag.com/articles/2019/06/26/modify-azure-arm-templates-with-powershell.aspx"><em>How To Modify Azure ARM Templates with PowerShell</em></a><a class="ps-heading-anchor" href="#how-to-modify-azure-arm-templates-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on June 26th</p><p>A nice thing about ARM templates is that they&rsquo;re JSON, which can be nicely converted into objects in PS for easy automation or testing. Adam&rsquo;s article gets you going with some guidance there.</p><h6 id="dsc-resource-kit-release-june-2019" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#dsc-resource-kit-release-june-2019"/><a href="https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-june-2019/"><em>DSC Resource Kit Release June 2019</em></a><a class="ps-heading-anchor" href="#dsc-resource-kit-release-june-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Katie Kragenbrink on June 26th</p><p>A new DSC Resource Kit has landed with updates to several modules.</p><h6 id="last-time-i-saw-this-many-shells-someone-sold-them-by-the-sea-shore" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#last-time-i-saw-this-many-shells-someone-sold-them-by-the-sea-shore"/><a href="https://jamesone111.wordpress.com/2019/06/22/last-time-i-saw-this-many-shells-someone-sold-them-by-the-sea-shore/"><em>Last time I saw this many shells, someone sold them by the sea shore</em></a><a class="ps-heading-anchor" href="#last-time-i-saw-this-many-shells-someone-sold-them-by-the-sea-shore" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by James O&rsquo;Neill on June 22nd</p><p>We have a lot of options for shells on Windows nows and James digs into some of the pros and cons of several of them. Figuring out how you like to run your PS? There&rsquo;s good detail for you here then.</p><h6 id="reddit-rpowershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#reddit-rpowershell"/><a href="https://old.reddit.com/r/PowerShell/comments/c4dzmz/poshwal_now_has_initial_support_for_the_new/?st=jxfmt6wv&amp;sh=584a379a"><em>Reddit /r/PowerShell</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Lots of fun stuff happening with the new Windows Terminal and now there&rsquo;s a script to automatically set the shell&rsquo;s color scheme to match your desktop wallpaper. Très beau!</p><h6 id="youtube-publishing-and-managing-modules-in-an-internal-repository-by-kevin-marquette" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#youtube-publishing-and-managing-modules-in-an-internal-repository-by-kevin-marquette"/><a href="https://www.youtube.com/watch?v=__Px5pyGvSs"><em>Youtube: Publishing and Managing Modules in an Internal Repository by Kevin Marquette</em></a><a class="ps-heading-anchor" href="#youtube-publishing-and-managing-modules-in-an-internal-repository-by-kevin-marquette" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>If you&rsquo;ve got some PS tools that need internal distribution, let Kevin give you a hand with building a solution to address that.</p><h6 id="youtube-13-years-in-a-shell-lessons-practices-and-achievements-in-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190628.md#youtube-13-years-in-a-shell-lessons-practices-and-achievements-in-powershell"/><a href="https://www.youtube.com/watch?v=_RbsYJxONww"><em>Youtube: 13 Years in a Shell: Lessons, Practices, and Achievements in PowerShell</em></a><a class="ps-heading-anchor" href="#youtube-13-years-in-a-shell-lessons-practices-and-achievements-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Presenting at the New York PSUG, Don Jones shares some knowledge, mistakes, and best practices spanning his career around PowerShell.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 21-June-2019</title><link>https://powershell.org/articles/2019-06-21-icymi-powershell-week-of-21-june-2019/</link><guid>https://powershell.org/articles/2019-06-21-icymi-powershell-week-of-21-june-2019/</guid><pubDate>Fri, 21 Jun 2019 14:00:46 +0000</pubDate><description>&lt;p&gt;Topics include security tools, security fixes, operation validation and module updates and open source UI creation.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include security tools, security fixes, operation validation and module updates and open source UI creation.</p><p>Special thanks to Prasoon Karunan V,Mark Roloff and Robin Dadswell.</p><h6 id="winspect---powershell-based-windows-auditing-tool" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#winspect---powershell-based-windows-auditing-tool"/><a href="https://gbhackers.com/winspect-windows-auditing-tool/"><em>WINSpect - Powershell based Windows Auditing Tool</em></a><a class="ps-heading-anchor" href="#winspect---powershell-based-windows-auditing-tool" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Bala Ganesh on June 20th</p><p>An over view of the WINSpect Tool.</p><h6 id="psavalonia--open-source-powershell-bindings-for-avalonia" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#psavalonia--open-source-powershell-bindings-for-avalonia"/><a href="https://ironmansoftware.com/psavalonia-open-source-powershell-bindings-for-avalonia/"><em>PSAvalonia – Open source PowerShell bindings for Avalonia</em></a><a class="ps-heading-anchor" href="#psavalonia--open-source-powershell-bindings-for-avalonia" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Driscoll on June 17th</p><p>Avalonia is a WPF-style cross-platform UI library. Today, we are open sourcing a PowerShell module to create UIs using the Avalonia library. The Avalonia bindings that were once part of PowerShell Pro Tools are now open source and up on GitHub and the PowerShell Gallery.</p><h6 id="distributed-and-flexible-operations-validation-framework--introduction" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#distributed-and-flexible-operations-validation-framework--introduction"/><a href="https://www.powershellmagazine.com/2019/06/17/distributed-and-flexible-operations-validation-framework-introduction/"><em>Distributed and Flexible Operations Validation Framework – Introduction</em></a><a class="ps-heading-anchor" href="#distributed-and-flexible-operations-validation-framework--introduction" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Ravikanth Chaganti on June 17th</p><p>Learn about the various options for operation validations are, and the limitations each come with.</p><h6 id="new-release-vmware-powercli-1130" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#new-release-vmware-powercli-1130"/><a href="https://blogs.vmware.com/PowerCLI/2019/06/new-release-powercli-11-3-0.html"><em>New Release: VMware PowerCLI 11.3.0</em></a><a class="ps-heading-anchor" href="#new-release-vmware-powercli-1130" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Kyle Ruddy on June 20th</p><p>See what updates have been made in PowerCLI 11.3.0 from speed improvements to new cmdlets.</p><h6 id="mitigating-bluekeep-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#mitigating-bluekeep-with-powershell"/><a href="https://mikefrobbins.com/2019/06/14/mitigating-bluekeep-with-powershell/"><em>Mitigating BlueKeep with PowerShell</em></a><a class="ps-heading-anchor" href="#mitigating-bluekeep-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mike F Robbins on June 14th</p><p>Ways to mitigate the BlueKeep vulnerability using remote PowerShell</p><h6 id="reddit-rpowershell---most-popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#reddit-rpowershell---most-popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/c349xf/enabling_ssl_for_powershell_remoting_by_default/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Help out in a discussion about SSL PowerShell Remoting, should it be done, or shouldn&rsquo;t it?</p><h6 id="youtube-tyler-leonhardt---simply-rest-api-testing-with-autorest-and-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190621.md#youtube-tyler-leonhardt---simply-rest-api-testing-with-autorest-and-powershell"/><a href="https://www.youtube.com/watch?v=LGQOGj0upZM&amp;feature=youtu.be"><em>Youtube: Tyler Leonhardt - Simply REST API testing with Autorest and PowerShell</em></a><a class="ps-heading-anchor" href="#youtube-tyler-leonhardt---simply-rest-api-testing-with-autorest-and-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Simplify testing of REST APIs using PowerShell and AutoRest</p><p>Testing REST APIs can be a pain. First you must construct you URI, then you decide what headers you need, maybe it needs a body… Then you’ll throw it in tools like cURL or Postman and hope you’ve formatted it correctly. What if it didn’t have to be that way? What if you could interact with your REST API from the comfort of your terminal without having to build a single URL.</p>]]></content:encoded></item><item><title>Universal Dashboard Templates – Scaffolding a New UD Project with Powershell</title><link>https://powershell.org/articles/2019-06-14-universal-dashboard-templates-scaffolding-a-new-ud-project-with-powershell/</link><guid>https://powershell.org/articles/2019-06-14-universal-dashboard-templates-scaffolding-a-new-ud-project-with-powershell/</guid><pubDate>Fri, 14 Jun 2019 15:28:58 +0000</pubDate><description>&lt;p&gt;&lt;em&gt;All code from this article is freely available on Github as a template repository. Just click &amp;ldquo;Use this template&amp;rdquo; on the repository page here:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/ArtisanByteCrafter/ud-template"&gt;https://github.com/ArtisanByteCrafter/ud-template&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="the-why" class="ps-heading wp-block-heading"&gt;The Why&lt;a class="ps-heading-anchor" href="#the-why" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Why should you consider scaffolding a new project? While we&amp;rsquo;re here, what exactly is scaffolding? Much like the term&amp;rsquo;s origin a project scaffold is meant to build a consistent framework and design that you can use to build your projects with.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p><em>All code from this article is freely available on Github as a template repository. Just click &ldquo;Use this template&rdquo; on the repository page here:</em></p><p><a href="https://github.com/ArtisanByteCrafter/ud-template">https://github.com/ArtisanByteCrafter/ud-template</a></p><h2 id="the-why" class="ps-heading wp-block-heading">The Why<a class="ps-heading-anchor" href="#the-why" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Why should you consider scaffolding a new project? While we&rsquo;re here, what exactly is scaffolding? Much like the term&rsquo;s origin a project scaffold is meant to build a consistent framework and design that you can use to build your projects with.</p><p>If you&rsquo;ve used products like Visual Studio, you&rsquo;re already familiar with scaffolding when you choose to begin a &ldquo;New Project&rdquo;. The IDE will auto-generate commonly used files and folder structures for the language you&rsquo;re writing in.</p><p>I&rsquo;m taking this same approach with my ud-template utility. By simply running the included</p><p><code>New-UDProject</code>script with a single parameter</p><p><code>-ProjectName 'myProject'</code>we invoke all the necessary steps to create a running dashboard with some pretty handy features already enabled.</p><p>Let&rsquo;s take a look at what we get and how it works.</p><h2 id="the-how" class="ps-heading wp-block-heading">The How<a class="ps-heading-anchor" href="#the-how" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p><img src="https://i.imgur.com/y7nBe0G.gif" alt="Imgur"/><p><code>New-UDProject -ProjectName 'myProject'</code>is the only command you need to run in order to create a new project framework for UD. It performs several things on your behalf:</p><p><strong>Creating the module</strong></p><p>We start by creating a module for our dashboard. We&rsquo;re going to use this module along with some boilerplate code in the .psm1 file to automatically import and source our functions.</p><p>It&rsquo;s definitely possible to import functions into all runspaces without a module using a</p><p><code>New-EndpointInitialization</code>declaration in the</p><p><code>dashboard.ps1</code>but I find this get&rsquo;s unwieldy very quickly on more robust projects, so I prefer each function in it&rsquo;s own file in a standard location,</p><p><code>/src</code>.</p><p><strong>Creating the file/folder structure</strong></p><p>The basic strucutre of our project is laid out as follows:</p><p><code>│ dashboard.ps1 │ dbconfig.json │ New-UDProject.ps1 │ README.md │ ├───assets ├───pages │ home.ps1 │ ├───src └───themes SampleTheme.ps1</code>-
Functions</p><p>Every function we want to declare will be in it&rsquo;s own</p><p><code>function.ps1</code>file in the</p><p><code>/src</code>folder, which our module will pick up and dot-source for all runspaces. This means every function should automatically be available for use in every script block of our dashboard.</p><ul><li>Pages</li></ul><p>I like to keep every page of my dashboard in it&rsquo;s own</p><p><code>page.ps1</code>file in</p><p><code>/pages</code>. Every file in this directory will be appended automatically to our dashboard and available from the navigation menu. a home page is included by default.</p><ul><li>Themes</li></ul><p>Similar to functions, every theme should be in it&rsquo;s own .ps1 file in</p><p><code>/themes</code>and will be sourced for the dashboard. Note, only a single theme can be used at a time, as this is the design of Universal Dashboard. By default, the dark-themed</p><p><code>SampleTheme.ps1</code>is enabled, as seen in the screenshot above.</p><ul><li>Dashboard Configuration</li></ul><p>I love json. It&rsquo;s ok if you don&rsquo;t but you&rsquo;re wrong and you should feel bad &lt;3 that&rsquo;s fine. For this project however, I&rsquo;m using a very simple json configuration to keep track of the project name, root module, and port our dashboard is running on. This is auto-generated from</p><p><code>New-UDProject</code>when you run it the first time. I&rsquo;m sure this will evolve to include more aspects of my dashboards in the future.</p><blockquote/><blockquote><p>If you&rsquo;re considering storing any form of credential in your json file…don&rsquo;t. Please. Think of the kittens. There are excellent ways to deal with<a href="https://github.com/ArtisanByteCrafter/KaceSMA/wiki/FAQ#q-i-want-to-run-my-api-script-in-an-automated-fashion-can-i-store-credentials-to-use-rather-than-being-prompted">authentication requests in code</a>.</p></blockquote><ul><li>Assets</li></ul><p>Assets are anything that needs to be included with your project and don&rsquo;t have another home- for example, fonts or images. This empty folder is created by</p><p><code>New-UDProject</code>as well.</p><ul><li>Running the dashboard</li></ul><p>The last aspect i want to cover is how this project runs the dashboard. Our</p><p><code>dashboard.ps1</code>covers several areas.</p><p>Import our config file</p><p><code>$ConfigurationFile = Get-Content (Join-Path $PSScriptRoot dbconfig.json) | ConvertFrom-Json</code>Import our module we created</p><p><code>Try { Import-Module (Join-Path $PSScriptRoot $ConfigurationFile.dashboard.rootmodule) -ErrorAction Stop } Catch { Write-Warning "Valid function module not found. Generate one by running $(Join-Path $PSScriptRoot New-UDProject.ps1) -ProjectName 'myProject'" break; }</code>Source our themes folder</p><p><code>. (Join-Path $PSScriptRoot "themes\*.ps1")</code>Generate our pages</p><p><code>$PageFolder = Get-ChildItem (Join-Path $PSScriptRoot pages) $Pages = Foreach ($Page in $PageFolder){ . (Join-Path $PSScriptRoot "pages\$Page") }</code>Auto-import our module, and thus our functions in /src</p><p><code>$Initialization = New-UDEndpointInitialization -Module @(Join-Path $PSScriptRoot $ConfigurationFile.dashboard.rootmodule)</code>Start our dashboard</p><p><code>$DashboardParams=@{ Title = $ConfigurationFile.dashboard.title Theme = $SampleTheme Pages = $Pages EndpointInitialization = $Initialization } $MyDashboard = New-UDDashboard @DashboardParams Start-UDDashboard -Port $ConfigurationFile.dashboard.port -Dashboard $MyDashboard -Name $ConfigurationFile.dashboard.title</code>This project is completely open source and I always like to hear feedback, or even a pull request for something you think is neat.</p><p>Happy dashboarding!</p><p>Nate</p><p>This is a cross-post of the original blog post on my personal blog here:<a href="https://www.natelab.us/universal-dashboard-templates-scaffolding-a-new-ud-project-with-powershell/">https://www.natelab.us/universal-dashboard-templates-scaffolding-a-new-ud-project-with-powershell</a></p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 14-June-2019</title><link>https://powershell.org/articles/2019-06-14-icymi-powershell-week-of-14-june-2019/</link><guid>https://powershell.org/articles/2019-06-14-icymi-powershell-week-of-14-june-2019/</guid><pubDate>Fri, 14 Jun 2019 15:00:33 +0000</pubDate><description>&lt;p&gt;Topics include Pester goodness, auto cleanup of Azure resources, PSPowerHour, and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Pester goodness, auto cleanup of Azure resources, PSPowerHour, and more.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="testing-self-contained-scripts-with-pester" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190614.md#testing-self-contained-scripts-with-pester"/><a href="http://jakubjares.com/2019/06/09/2019-07-testing-whole-scripts/"><em>Testing Self-contained Scripts With Pester</em></a><a class="ps-heading-anchor" href="#testing-self-contained-scripts-with-pester" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jakub Jareš on June 9th</p><p>Unit testing your scripts can be a pain if you&rsquo;re in the habit of calling functions in the same file that you declare them in.</p><h6 id="azure-garbage-collection" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190614.md#azure-garbage-collection"/><a href="https://www.feval.ca/posts/azure-garbage-collection/"><em>Azure Garbage Collection</em></a><a class="ps-heading-anchor" href="#azure-garbage-collection" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Charles Féval on June 10th</p><p>If you&rsquo;re forgetful and sometimes leave test resources in Azure longer than necessary, Charles has a great Function App that automatically categorizes and cleans up specially marked resources. Our wallets rejoice!</p><h6 id="using-powershell-to-retrieve-cac-information" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190614.md#using-powershell-to-retrieve-cac-information"/><a href="https://sccmf12twice.com/2019/06/using-powershell-to-retrieve-cac-information/"><em>Using PowerShell to retrieve CAC Information</em></a><a class="ps-heading-anchor" href="#using-powershell-to-retrieve-cac-information" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Peter Vanhaverbeke on June 12th</p><p>Those of you in the military space may be working with Federal Agency Smartcard Numbers. Peter has whipped together a script for pulling certificate information from those cards.</p><h6 id="project-terminal-icons" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190614.md#project-terminal-icons"/><a href="https://github.com/devblackops/Terminal-Icons"><em>Project: Terminal-Icons</em></a><a class="ps-heading-anchor" href="#project-terminal-icons" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brandon Olin</p><p>Need to class your shell up a bit? Brandon has released a module that&rsquo;ll display folder and file icons right in the shell.</p><h6 id="youtube-powershell-is-dead-epic-learnings" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190614.md#youtube-powershell-is-dead-epic-learnings"/><a href="https://www.youtube.com/watch?v=wIhlchiRmKQ"><em>YouTube: Powershell Is DEAD-Epic Learnings!</em></a><a class="ps-heading-anchor" href="#youtube-powershell-is-dead-epic-learnings" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Ben Turner, Doug McLeod, Rob Maslen on June 9th</p><p>From Security BSides London, this is a pretty damn cool deep dive into some of the latest techniques used by red and blue teams with PowerShell and it&rsquo;s underlying or related technologies.</p><h6 id="youtube-pspowerhour-008-2019-06-13" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190614.md#youtube-pspowerhour-008-2019-06-13"/><a href="https://www.youtube.com/watch?v=9go5hF5S7Ig"><em>Youtube: PSPowerHour 008: 2019-06-13</em></a><a class="ps-heading-anchor" href="#youtube-pspowerhour-008-2019-06-13" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>It&rsquo;s been a while but PSPowerHour is back with some great lightning content. Azure pipelines, web servers, fonts, and more!</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 7-June-2019</title><link>https://powershell.org/articles/2019-06-07-icymi-powershell-week-of-7-june-2019/</link><guid>https://powershell.org/articles/2019-06-07-icymi-powershell-week-of-7-june-2019/</guid><pubDate>Fri, 07 Jun 2019 15:30:56 +0000</pubDate><description>&lt;p&gt;Topics include checking patch status, About help docs, variable scoping, and proposed changes to PowerShellGet.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include checking patch status, About help docs, variable scoping, and proposed changes to PowerShellGet.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff</p><h6 id="demo-debug-powershell-azure-functions-locally" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#demo-debug-powershell-azure-functions-locally"/><a href="https://blog.osull.com/2019/06/03/demo-debug-powershell-azure-functions-locally/"><em>Demo: Debug PowerShell Azure Functions locally</em></a><a class="ps-heading-anchor" href="#demo-debug-powershell-azure-functions-locally" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Dan O&rsquo;Sullivan on June 3rd</p><p>Looking to dip into Azure Functions? Dan has a nice demo on local debugging that can help iron out any kinks in your code.</p><h6 id="powershell-script-to-find-out-patch-installation-status-on-remote-computers" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#powershell-script-to-find-out-patch-installation-status-on-remote-computers"/><a href="https://www.anoopcnair.com/powershell-script-patch-installation-status/"><em>PowerShell Script to Find Out Patch Installation Status on Remote Computers</em></a><a class="ps-heading-anchor" href="#powershell-script-to-find-out-patch-installation-status-on-remote-computers" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Hareesh Jampani on June 4th</p><p>Hareesh has put together a script that can help you quickly determine the status of patches on your systems.</p><h6 id="dude-wheres-my-var--understanding-scoping-in-universal-dashboard" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#dude-wheres-my-var--understanding-scoping-in-universal-dashboard"/><a href="https://ironmansoftware.com/dude-wheres-my-variable-understanding-scoping-in-universal-dashboard/"><em>Dude, where’s my var? – Understanding scoping in Universal Dashboard</em></a><a class="ps-heading-anchor" href="#dude-wheres-my-var--understanding-scoping-in-universal-dashboard" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Driscoll on June 5th</p><p>Scoping can sometimes get confusing. Especially in runspaces, which are a core component of how UD works. Adam does a great job of breaking this down for the rest of us neophytes.</p><h6 id="powershell-basics-meet-about---the-owners-manual-for-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#powershell-basics-meet-about---the-owners-manual-for-powershell"/><a href="https://techcommunity.microsoft.com/t5/ITOps-Talk-Blog/PowerShell-Basics-Meet-About-The-Owner-s-Manual-for-PowerShell/ba-p/668443?WT.mc_id=ITOPSTALK-reddit-abartolo"><em>PowerShell Basics: Meet About - The Owner’s Manual for PowerShell</em></a><a class="ps-heading-anchor" href="#powershell-basics-meet-about---the-owners-manual-for-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Michael Bender on June 6th</p><p>The About pages in PowerShell&rsquo;s help docs are some of the best places to learn new concepts. Everyone should know about them, use them, love them.</p><h6 id="rfc---dsc-community-logo" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#rfc---dsc-community-logo"/><a href="https://github.com/PowerShell/DscResources/issues/507"><em>RFC - DSC Community Logo</em></a><a class="ps-heading-anchor" href="#rfc---dsc-community-logo" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>The DSC community has decided that it&rsquo;s time for a logo. Hop in, check out the options, vote on your favorite!</p><h6 id="reddit-rpowershell---most-popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#reddit-rpowershell---most-popular-weekly-post"/><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/URL"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Description of Reddit topic</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#tweet-of-the-week"/><a href="https://twitter.com/Steve_MSFT/status/1134513315973980160?s=19"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Steve Lee inherits PowerShellGet (Find/Install-Module) and issues an RFC to discuss proposed breaking changes with the new version.</p><h6 id="youtube-automating-active-directory-health-checks-with-psadhealth" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190607.md#youtube-automating-active-directory-health-checks-with-psadhealth"/><a href="https://www.youtube.com/watch?v=Xldbaxw4vJI"><em>Youtube: Automating Active Directory Health Checks with PSADHealth</em></a><a class="ps-heading-anchor" href="#youtube-automating-active-directory-health-checks-with-psadhealth" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From the London PowerShell Meetup, Daniel Krebs covers the PSADHealth module and how it can help you monitor AD for any issues.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 31-May-2019</title><link>https://powershell.org/articles/2019-05-31-icymi-powershell-week-of-31-may-2019/</link><guid>https://powershell.org/articles/2019-05-31-icymi-powershell-week-of-31-may-2019/</guid><pubDate>Fri, 31 May 2019 15:00:46 +0000</pubDate><description>&lt;p&gt;Topics include the PowerShell 7 preview, exporting SCCM task sequences, integration testing, and cloud automation.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include the PowerShell 7 preview, exporting SCCM task sequences, integration testing, and cloud automation.</p><p>Content curated by Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="follow-this-step-by-step-guide-to-use-aws-lambda-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#follow-this-step-by-step-guide-to-use-aws-lambda-with-powershell"/><a href="https://searchaws.techtarget.com/tutorial/Follow-this-step-by-step-guide-to-use-AWS-Lambda-with-PowerShell"><em>Follow this step-by-step guide to use AWS Lambda with PowerShell</em></a><a class="ps-heading-anchor" href="#follow-this-step-by-step-guide-to-use-aws-lambda-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Prateek Singh on May 27th</p><p>A great and detailed starting point for Lambda Functions, and all from the shell.</p><h6 id="an-example-azure-devops-build-pipeline-for-powershell-modules" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#an-example-azure-devops-build-pipeline-for-powershell-modules"/><a href="https://adamrushuk.github.io/example-azure-devops-build-pipeline-for-powershell-modules/"><em>An Example Azure DevOps Build Pipeline for PowerShell modules</em></a><a class="ps-heading-anchor" href="#an-example-azure-devops-build-pipeline-for-powershell-modules" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Rush on May 27th</p><p>If you&rsquo;re looking to dip a toe into the current best practice for building modules, this blog from Adam is a good place to start.</p><h6 id="export-task-sequences-packages-baselines-with-logging" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#export-task-sequences-packages-baselines-with-logging"/><a href="https://garytown.com/export-task-sequences-packages-baselines-with-logging"><em>Export Task Sequences, Packages, Baselines with Logging</em></a><a class="ps-heading-anchor" href="#export-task-sequences-packages-baselines-with-logging" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Gary Blok on May 25th</p><p>For those in the SCCM world, Gary&rsquo;s script works through a handy process of exporting task sequences and comparing them to a backed up copy to determine if any changes have been made. There&rsquo;s lots of nice little nuggets in here.</p><h6 id="powershell--testing-endpoints-that-perform-anti-forgery-verification" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#powershell--testing-endpoints-that-perform-anti-forgery-verification"/><a href="https://foxdeploy.com/2019/05/29/powershell-testing-endpoints-that-perform-anti-forgery-verification/"><em>PowerShell – Testing endpoints that perform Anti-forgery verification</em></a><a class="ps-heading-anchor" href="#powershell--testing-endpoints-that-perform-anti-forgery-verification" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Stephen Owen on May 29th</p><p>Testing is so hot right now, and Stephen has a pretty cool example of integration testing to validate that a web app is properly catching CSRF attacks.</p><h6 id="powershell-7-road-map" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#powershell-7-road-map"/><a href="https://devblogs.microsoft.com/powershell/powershell-7-road-map/"><em>PowerShell 7 Road Map</em></a><a class="ps-heading-anchor" href="#powershell-7-road-map" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Steve Lee on May 30th</p><p>PowerShell 7 is coming! The first preview version is out. The road map is here. There&rsquo;re some exciting changes with this, including line continuation with the pipe at the start of a newline.</p><h6 id="reddit-rpowershell---script-sharing" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#reddit-rpowershell---script-sharing"/><a href="https://old.reddit.com/r/PowerShell/comments/bslu5n/powershell_script_to_view_and_delete_local/"><em>Reddit /r/PowerShell - Script Sharing</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---script-sharing" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>/u/atoomepuu shares a great little script with a WPF GUI for viewing and removing user profiles.</p><h6 id="podcast-cloudskillsfm-ep23-cloud-development-and-automation-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190531.md#podcast-cloudskillsfm-ep23-cloud-development-and-automation-with-powershell"/><a href="https://cloudskills.fm/023"><em>Podcast: CloudSkills.fm Ep.23: Cloud Development and Automation with PowerShell</em></a><a class="ps-heading-anchor" href="#podcast-cloudskillsfm-ep23-cloud-development-and-automation-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>If you haven&rsquo;t listened to Mike Pfeiffer&rsquo;s podcast, it&rsquo;s well worth your time. This episode features MVP Adam Driscoll, of Universal Dashboard and PowerShell Pro Tools fame.</p>]]></content:encoded></item><item><title>PowerShell Summit: A First Time Experience</title><link>https://powershell.org/articles/2019-05-30-__trashed/</link><guid>https://powershell.org/articles/2019-05-30-__trashed/</guid><pubDate>Thu, 30 May 2019 05:13:01 +0000</pubDate><description>&lt;p&gt;It&amp;rsquo;s been a few weeks since Summit and I feel like my mind has finally started to settle from all of the ideas that I came back with. Plus, being away from home for a week means I had a lot of domestic work and daddy time to catch up on. When Will asked for volunteers to write about their first time experience, I decided to see if I could offer my take on the matter considering gulf between what I expected to get and what I ended up getting.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>It&rsquo;s been a few weeks since Summit and I feel like my mind has finally started to settle from all of the ideas that I came back with. Plus, being away from home for a week means I had a lot of domestic work and daddy time to catch up on. When Will asked for volunteers to write about their first time experience, I decided to see if I could offer my take on the matter considering gulf between what I expected to get and what I ended up getting.</p><h3 id="expectations-going-in" class="ps-heading wp-block-heading">Expectations going in<a class="ps-heading-anchor" href="#expectations-going-in" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>I&rsquo;ve known about Summit for a few years, so had an idea of what I was flying off to. Prior year&rsquo;s sessions are easily available on YouTube and I&rsquo;ve picked my way through them for particular topics that I&rsquo;ve had a need to learn about. I&rsquo;ve also seen plenty of post-Summit conversation about how much people have enjoyed it, how valuable the connections they made are, and how they can&rsquo;t wait to go back. I never dug terribly deep into it, though.</p><p>My expectations were that I would arrive, awkwardly socialize with colleagues, maybe some sales or marketing folks, exchange company info with a phone number that I never answer, and attend sessions where I&rsquo;d learn some cool new things.</p><p>Enjoyably, I was quite wrong&hellip;</p><h3 id="straight-to-it" class="ps-heading wp-block-heading">Straight to it<a class="ps-heading-anchor" href="#straight-to-it" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>I won&rsquo;t mince words here. If you&rsquo;re looking for a conference where the latest doodads and features (available in 6-12 months, I&rsquo;m looking at you Ignite) are in your face, move along. This isn&rsquo;t it. There aren&rsquo;t really any sales or marketing at Summit (some sponsor booths, but you really have to seek them out). Unless you want to count Summit talking about how great Summit is for you, but I&rsquo;m chalking that up as more a statement of fact than any kind of pitch.</p><p>When Don Jones gave his keynote, he offered a lot of poignant observations about the state of our industry and where ops fits in with an ever-changing landscape that is more and more dominated by software methodologies. He talked about not letting your job own your career, about taking control of it for yourself, and about building a supportive community around the ownership and growth of our careers. It was all about climbing that pyramid toward self-actualization, and that&rsquo;s where communities like Summit seek to create an environment to help you along that climb.</p><p>By the end of the first afternoon, I was already feeling pretty jazzed up on that alone.</p><p><img src="https://powershell.org/wp-content/uploads/2019/05/no_ordinary_conference.gif" alt=""/><h3 id="sessions-hallway-talks-and-stickers" class="ps-heading wp-block-heading">Sessions, hallway talks, and stickers<a class="ps-heading-anchor" href="#sessions-hallway-talks-and-stickers" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Sessions are Summit&rsquo;s bread and butter, and definitely the primary place to see examples of cool tools, best practices, and novel ways of approaching problems that you may not have even known you had.</p><p>Leading up to the event, I spent time in the mobile app going over the sessions to plan out my agenda. Unfortunately, and this is a good problem to have, there was often more than one that I wanted to see during any given time slot. So, I took some advice that I was given during Sunday&rsquo;s reception; I sat in the ones that felt I would potentially want to ask questions in. This, along with prioritizing those sessions that I felt would be most beneficial to the direction I hope to steer my career, ended up working out pretty well for me.</p><p>Each presenter that I saw, and I&rsquo;m certainly not discounting those I didn&rsquo;t, did a fantastic job of really making their material something that I walked out thirsting for more of. And these sessions really dominated a lot of my thoughts for several days after getting home. My coworker (whom also attended) and I started to immediately brainstorm on how we could apply a lot of what was learned to our workflows and future projects, and I think our boss is both terrified and excited by that.</p><p>Between sessions though, you&rsquo;ve got a good opportunity to quickly chat up other attendees in the hall (or the speaker you just saw). People discussing the talk they saw, mentioning details of how they use $x in their environments&hellip; Before you know it, you&rsquo;re having mini-sessions between sessions and making mental notes to catch up with particular people during lunch r after-hours activities for more brain-picking. If you follow the community online, it&rsquo;s also common to run across the bloggers and maintainers whose work you probably use frequently. It&rsquo;s cool; they don&rsquo;t bite and everyone is happy to hear about how their contributions have helped others, and a lot of them want to know about<em>you</em> too.</p><p>Stickers, now, are a curious point and a surprisingly omnipresent part of the event. If you think you&rsquo;re not really into stickers, you may very well leave Summit changed in that respect. They&rsquo;re everywhere. Custom stickers, vendor stickers, event stickers, stickers getting ooh&rsquo;d and ah&rsquo;d over like grade school kids and their pogs, and whenever someone enters a room to drop a pile on a table, people flock over them like pigeons at the park. It&rsquo;s a fun and geeky collectible to be proudly displayed on laptops or peg boards back home, and you may quickly find yourself hunting down the creators of certain designs. This, again, leads to making even more connections and getting to know the community.</p><h3 id="a-little-coffee-and-casual-chat" class="ps-heading wp-block-heading">A little coffee and casual chat<a class="ps-heading-anchor" href="#a-little-coffee-and-casual-chat" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>The side sessions are late/last minute planned break outs that would typically not be recorded. Some examples included a meet and greet with the event&rsquo;s organizers, a meeting of user group organizers, and a brief introduction to PowerShell live streaming. Depending on your level of interest, these could easily be more valuable to you than the standard sessions and I decided to give them a little focus on my last day, when Brandon Lundt hosted a lean coffee session.</p><p>This was an interesting format that I had never seen or heard of before; they honestly just had me at &ldquo;coffee&rdquo; and &ldquo;deep discussion&rdquo; in the description. This is how it works&hellip;</p><p>Everyone writes a few topics on paper, puts them into a hat, those get sorted, and we&rsquo;d move through them in order of popularity. Majority votes would keep a topic alive or move to the next every 10-15 minutes.</p><p>What we spent most of our time on was concerns around community engagement in user groups. Having recently taken up a co-leadership role in Denver&rsquo;s user group, my interest was piqued and I learned that lots of groups share similar struggles&hellip; Location, expanding their number of regulars with fresh faces, topics&hellip; And I walked away with some good ideas for addressing some of that. One of my favorites being a semi-regular event to simply get newcomers introduced to PowerShell, and once they&rsquo;ve tasted the sweet freedom of automation, give them more. We may also try rotating our location every month or so to better appeal to more people across our sprawling city. Definitely plenty to discuss with my other partners in crime at the group.</p><h3 id="departing-impressions" class="ps-heading wp-block-heading">Departing impressions<a class="ps-heading-anchor" href="#departing-impressions" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>I have difficulty imagining that anyone could attend Summit and<em>not</em> walk away feeling at least a little humbled by how invested in itself this community is. Everybody you meet is happy to share their experiences and knowledge, eager to help others learn, and enthusiastic to see others grow. And I left with a strong desire to see if we can bring some of that flavor into our local group, and provide some support and guidance for people looking to own their careers.</p><p>I&rsquo;m definitely hoping to attend again next year and I&rsquo;d absolutely encourage anyone else to as well. Even if you feel like a bit of a wallflower, there&rsquo;s tremendous value in it for you; both personally and professionally.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 24-May-2019</title><link>https://powershell.org/articles/2019-05-24-icymi-powershell-week-of-24-may-2019/</link><guid>https://powershell.org/articles/2019-05-24-icymi-powershell-week-of-24-may-2019/</guid><pubDate>Fri, 24 May 2019 15:00:16 +0000</pubDate><description>&lt;p&gt;Topics include unit testing your NetApp, logging, Office templates, and *DRUM ROLL* recordings from Summit!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include unit testing your NetApp, logging, Office templates, and *DRUM ROLL* recordings from Summit!</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff</p><h6 id="ontap-configuration-compliance-auditing-with-powershell-and-pester" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190524.md#ontap-configuration-compliance-auditing-with-powershell-and-pester"/><a href="https://www.langhq.com/2019/05/ontap-configuration-compliance-auditing.html"><em>ONTAP Configuration Compliance Auditing with PowerShell and Pester</em></a><a class="ps-heading-anchor" href="#ontap-configuration-compliance-auditing-with-powershell-and-pester" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Donny Lang on May 19th</p><p>Validating that your infrastructure is configured as expected at any given time is a valuable skill these days. Donny goes into detail on how he combines Pester with the NetApp PowerShell Toolkit to make sure everything as it should be.</p><h6 id="producing-live-visuals-from-a-powershell-rest-api" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190524.md#producing-live-visuals-from-a-powershell-rest-api"/><a href="https://ja.mesmontgomery.co.uk/2019/05/producing-live-visuals-from-a-powershell-rest-api/"><em>Producing Live Visuals From a PowerShell REST API</em></a><a class="ps-heading-anchor" href="#producing-live-visuals-from-a-powershell-rest-api" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by James Montgomery on May 17th</p><p>Universal Dashboard + vis.js -eq A pretty cool way to build visualizations of relationships between sets of data.</p><h6 id="using-the-ast-to-find-module-dependencies-in-powershell-functions-and-scripts" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190524.md#using-the-ast-to-find-module-dependencies-in-powershell-functions-and-scripts"/><a href="https://mikefrobbins.com/2019/05/17/using-the-ast-to-find-module-dependencies-in-powershell-functions-and-scripts/"><em>Using the AST to Find Module Dependencies in PowerShell Functions and Scripts</em></a><a class="ps-heading-anchor" href="#using-the-ast-to-find-module-dependencies-in-powershell-functions-and-scripts" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mike F Robbins on May 17th</p><p>Showcasing his MrModuleBuildTools module, Mike demonstrates how easy it is (and how<em>powerful</em> the AST is) to list out required modules, private functions, or even function definitions in a directory.</p><h6 id="office-templates-in-the-cloud" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190524.md#office-templates-in-the-cloud"/><a href="https://www.iphase.dk/office-templates-in-the-cloud/"><em>Office Templates in the Cloud</em></a><a class="ps-heading-anchor" href="#office-templates-in-the-cloud" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Michael Mardahl on May 21st</p><p>If you&rsquo;re itching for a little automated distribution of Office templates in your company, Michael has worked out a method of getting them into users&rsquo; hands via OneDrive with this script.</p><h6 id="powershell-when-and-where-writing-logs-matters" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190524.md#powershell-when-and-where-writing-logs-matters"/><a href="https://www.scriptinglibrary.com/languages/powershell/powershell-when-and-where-writing-logs-matters/"><em>PowerShell: When and Where Writing Logs Matters</em></a><a class="ps-heading-anchor" href="#powershell-when-and-where-writing-logs-matters" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Paolo Frigo on May 21st</p><p>You do implement logging in your scripts, right? Shh&hellip; I won&rsquo;t tell anyone. Paolo makes a great case for why we should be doing it more often though, and introduces several methods that can be used to get there.</p><h6 id="powershell--devops-global-summit-2019" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190524.md#powershell--devops-global-summit-2019"/><a href="https://www.youtube.com/playlist?list=PLfeA8kIs7Cocir1-TuSN3mOnj3qzyRShA"><em>PowerShell + DevOps Global Summit 2019</em></a><a class="ps-heading-anchor" href="#powershell--devops-global-summit-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Session recordings from this year&rsquo;s Summit went live this week!</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 17-May-2019</title><link>https://powershell.org/articles/2019-05-17-icymi-powershell-week-of-17-may-2019/</link><guid>https://powershell.org/articles/2019-05-17-icymi-powershell-week-of-17-may-2019/</guid><pubDate>Fri, 17 May 2019 15:00:32 +0000</pubDate><description>&lt;p&gt;Topics include working with the Graph API, Chocolatey, jazzing up your functions with pipeline support, and shrinking VMDKs.&lt;/p&gt;
&lt;p&gt;Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.&lt;/p&gt;
&lt;h6 id="how-to-shrink-vmdk-with-a-couple-of-powershell-scripts" class="ps-heading wp-block-heading"&gt;&lt;a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#how-to-shrink-vmdk-with-a-couple-of-powershell-scripts"&gt;&lt;/a&gt;&lt;a href="https://www.vmwareblog.org/shrink-vmdk-couple-powershell-scripts/"&gt;&lt;em&gt;How to shrink VMDK with a couple of PowerShell scripts?&lt;/em&gt;&lt;/a&gt;&lt;a class="ps-heading-anchor" href="#how-to-shrink-vmdk-with-a-couple-of-powershell-scripts" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h6&gt;
&lt;p&gt;by Kevin Soltow on May 8th&lt;/p&gt;
&lt;p&gt;Not just a set of useful scripts for anyone still working in a space-constrained environment, but a great bit of interesting detail has also gone into this.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include working with the Graph API, Chocolatey, jazzing up your functions with pipeline support, and shrinking VMDKs.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan V, and Mark Roloff.</p><h6 id="how-to-shrink-vmdk-with-a-couple-of-powershell-scripts" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#how-to-shrink-vmdk-with-a-couple-of-powershell-scripts"/><a href="https://www.vmwareblog.org/shrink-vmdk-couple-powershell-scripts/"><em>How to shrink VMDK with a couple of PowerShell scripts?</em></a><a class="ps-heading-anchor" href="#how-to-shrink-vmdk-with-a-couple-of-powershell-scripts" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Kevin Soltow on May 8th</p><p>Not just a set of useful scripts for anyone still working in a space-constrained environment, but a great bit of interesting detail has also gone into this.</p><h6 id="powershell-script---massdownloader---efficient-automated-fault-tolerant-idempotent-downloader-with-real-time-metrics" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#powershell-script---massdownloader---efficient-automated-fault-tolerant-idempotent-downloader-with-real-time-metrics"/><a href="https://www.bryanvine.com/2019/05/powershell-script-massdownloader.html?m=1"><em>Powershell Script - MassDownloader - Efficient, Automated, Fault Tolerant, idempotent downloader with real time metrics</em></a><a class="ps-heading-anchor" href="#powershell-script---massdownloader---efficient-automated-fault-tolerant-idempotent-downloader-with-real-time-metrics" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Bryan Vine on May 12th</p><p>Taking BITS to the next level, Bryan has a nice script that automates some of the features and adds a progress indicator for each download.</p><h6 id="advanced-powershell-functions-begin-to-process-to-end" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#advanced-powershell-functions-begin-to-process-to-end"/><a href="https://www.sapien.com/blog/2019/05/13/advanced-powershell-functions-begin-to-process-to-end/"><em>Advanced PowerShell Functions: Begin to Process to End</em></a><a class="ps-heading-anchor" href="#advanced-powershell-functions-begin-to-process-to-end" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brittney Ryn on May 13th</p><p>Interested in making your functions work in a pipeline? Brittney has put together an excellent guide to understanding how to do this, as well as a peek into some of the under-the-hood behavior.</p><h6 id="powershell-module-for-json-schema-validation" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#powershell-module-for-json-schema-validation"/><a href="https://blog.tyang.org/2019/05/12/powershell-module-for-json-schema-validation/"><em>PowerShell Module For JSON Schema Validation</em></a><a class="ps-heading-anchor" href="#powershell-module-for-json-schema-validation" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Tao Yang on May 12th</p><p>Tao needed to validate multiple JSON files, so he did what any self-respecting scripter would do. He wrote a new function that leverages Core&rsquo;s native<em>Test-Json</em> in combination with Pester to validate an entire directory of files.</p><h6 id="powershell-ms-graph-api-azure-automation-and-intune" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#powershell-ms-graph-api-azure-automation-and-intune"/><a href="https://timothygruber.com/scripts/powershell/powershell-ms-graph-api-azure-automation-and-intune/"><em>PowerShell, MS Graph API, Azure Automation, and Intune</em></a><a class="ps-heading-anchor" href="#powershell-ms-graph-api-azure-automation-and-intune" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Timothy Gruber on May 8th</p><p>Knowing how to work with Graph opens up a lot of cool doors for your projects and Timothy&rsquo;s guide is a fantastic place to start.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#tweet-of-the-week"/><a href="https://twitter.com/jeremytbrun/status/1126895640674488321"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Did you know that PowerShell Core has some significant performance improvements over 5.1? @jeremytbrun stumbled across the enhancements in<em>Group-Object</em> after making the switch.</p><h6 id="youtube-chocolatey-from-zero-to-software-deployment-hero-in-60-minutes" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190517.md#youtube-chocolatey-from-zero-to-software-deployment-hero-in-60-minutes"/><a href="https://www.youtube.com/watch?v=5pgLPgIO7fI"><em>Youtube: Chocolatey: From zero to software deployment hero in 60 minutes!</em></a><a class="ps-heading-anchor" href="#youtube-chocolatey-from-zero-to-software-deployment-hero-in-60-minutes" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Tired of installing applications the hard way? Take a little tour of Chocolatey with Steven Valdinger and learn to do it like the pros!</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 10-May-2019</title><link>https://powershell.org/articles/2019-05-10-icymi-powershell-week-of-10-may-2019/</link><guid>https://powershell.org/articles/2019-05-10-icymi-powershell-week-of-10-may-2019/</guid><pubDate>Fri, 10 May 2019 15:00:16 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell Summit, finding account lockouts, certs, and learning PS via Pester.&lt;/p&gt;
&lt;p&gt;Content curated by Robin Dadswell, Prasoon Karunan, and Mark Roloff.&lt;/p&gt;
&lt;h6 id="takeaways-from-the-powershell--devops-global-summit-2019" class="ps-heading wp-block-heading"&gt;&lt;a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#takeaways-from-the-powershell--devops-global-summit-2019"&gt;&lt;/a&gt;&lt;a href="https://mattbobke.com/2019/05/02/takeaways-from-the-powershell-+-devops-global-summit-2019/"&gt;&lt;em&gt;Takeaways from the PowerShell + DevOps Global Summit 2019&lt;/em&gt;&lt;/a&gt;&lt;a class="ps-heading-anchor" href="#takeaways-from-the-powershell--devops-global-summit-2019" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h6&gt;
&lt;p&gt;by Matt Bobke on May 2nd&lt;/p&gt;
&lt;p&gt;If you couldn&amp;rsquo;t make it to Summit, fret not! While waiting for videos you can read about it from attendees, like Matt, whom participated in the OnRamp track.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell Summit, finding account lockouts, certs, and learning PS via Pester.</p><p>Content curated by Robin Dadswell, Prasoon Karunan, and Mark Roloff.</p><h6 id="takeaways-from-the-powershell--devops-global-summit-2019" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#takeaways-from-the-powershell--devops-global-summit-2019"/><a href="https://mattbobke.com/2019/05/02/takeaways-from-the-powershell-+-devops-global-summit-2019/"><em>Takeaways from the PowerShell + DevOps Global Summit 2019</em></a><a class="ps-heading-anchor" href="#takeaways-from-the-powershell--devops-global-summit-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Matt Bobke on May 2nd</p><p>If you couldn&rsquo;t make it to Summit, fret not! While waiting for videos you can read about it from attendees, like Matt, whom participated in the OnRamp track.</p><h6 id="execute-a-script-block-accepting-pipeline-input-and-show-your-progress" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#execute-a-script-block-accepting-pipeline-input-and-show-your-progress"/><a href="https://yvez.be/2019/05/05/execute-a-script-block-accepting-pipeline-input-and-show-your-progress/"><em>Execute a script block accepting pipeline input and show your progress</em></a><a class="ps-heading-anchor" href="#execute-a-script-block-accepting-pipeline-input-and-show-your-progress" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Yves Rosius on May 5th</p><p><em>Show-Progress</em> is essentially a clever little wrapper around<em>Write-Progress</em> but it works in the pipeline. Handy for those long-running one-liners.</p><h6 id="tracking-down-bad-password-attempts-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#tracking-down-bad-password-attempts-with-powershell"/><a href="https://theposhwolf.com/howtos/Get-ADUserBadPasswords/"><em>Tracking down bad password attempts with PowerShell</em></a><a class="ps-heading-anchor" href="#tracking-down-bad-password-attempts-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Anthony Howell on May 9th</p><p>Keeping an eye on account lockouts can give you a heads up in case of malicious shenanigans or just incoming help desk calls. Anthony walks us through writing a function that can quickly pull that information together.</p><h6 id="powershell-generate-self-signed-certificate-with-self-signed-root-ca-signer" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#powershell-generate-self-signed-certificate-with-self-signed-root-ca-signer"/><a href="http://vcloud-lab.com/entries/powershell/powershell-generate-self-signed-certificate-with-self-signed-root-ca-signer"><em>Powershell Generate Self-signed certificate with Self-Signed Root CA Signer</em></a><a class="ps-heading-anchor" href="#powershell-generate-self-signed-certificate-with-self-signed-root-ca-signer" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Kunal Udapi on May 5th</p><p>If self-signed certs are on your agenda, Kunal has your quick and dirty intro to making and installing them.</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#reddit-rpowershell---popular-weekly-post"/><a href="https://old.reddit.com/r/PowerShell/comments/bl13qi/sysadmin_learning_powershell_what_other_languages/"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Curious about complementary languages or knowledge-areas once you&rsquo;re comfortable with PowerShell? Stop in this thread for a few ideas.</p><h6 id="youtube-learn-powershell-concepts-using-pester-with-joel-sallow" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190510.md#youtube-learn-powershell-concepts-using-pester-with-joel-sallow"/><a href="https://www.youtube.com/watch?v=ahYfLzqKDM0"><em>Youtube: Learn PowerShell concepts using Pester! with Joel Sallow</em></a><a class="ps-heading-anchor" href="#youtube-learn-powershell-concepts-using-pester-with-joel-sallow" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Learning PowerShell almost goes hand-in-hand with Pester these days. Since you need to learn both, why not all at once?</p>
]]></content:encoded></item><item><title>Summit 2020 – A New Addition</title><link>https://powershell.org/articles/2019-05-06-summit-2020-a-new-addition/</link><guid>https://powershell.org/articles/2019-05-06-summit-2020-a-new-addition/</guid><pubDate>Mon, 06 May 2019 16:00:29 +0000</pubDate><description>&lt;p&gt;Last week at the PowerShell + DevOps Global Summit, we announced the dates for next year&amp;rsquo;s summit. The event will again be held at the Meydenbauer Center in Bellevue, Washington on April 27th to April 30th.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DevOps + Automation Summit - Nashville&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We are also proud to announce that our flagship summit event would be getting a new addition to the family in the form of the DevOps + Automation Summit being held on October 21st to October 23rd, 2020 at the Renaissance Hotel in Downtown Nashville!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Last week at the PowerShell + DevOps Global Summit, we announced the dates for next year&rsquo;s summit. The event will again be held at the Meydenbauer Center in Bellevue, Washington on April 27th to April 30th.</p><p><strong>DevOps + Automation Summit - Nashville</strong></p><p>We are also proud to announce that our flagship summit event would be getting a new addition to the family in the form of the DevOps + Automation Summit being held on October 21st to October 23rd, 2020 at the Renaissance Hotel in Downtown Nashville!</p><p><img src="https://powershell.org/wp-content/uploads/2019/04/image-1-1024x275.png" alt=""> *<br>
*</p><p>A lot of thought went into the decision to launch a new event. This last year, the PowerShell + DevOps Global Summit again exceeded expectations by not only selling out a full month ahead of last year&rsquo;s event, but we had over 250 people on the waiting list for tickets.</p><p>There has also been increased demand for broader DevOps content beyond PowerShell, and with us reaching the upper limit of capacity at the primary event, it became a challenge to introduce new content. For every session of new content that we would add, we would have to take a slot away from our primary focus in Bellevue, which is PowerShell.</p><p><strong>So who should attend which conference?</strong></p><p>Ideally, you could attend both! These two events aren&rsquo;t duplicates of each other, but rather are designed to be complimentary. But to break it down a bit easier, the PowerShell + DevOps Summit will remain the focus for an admin whose job is 70% or more PowerShell-centric, and maybe doing some DevOps and cloud work. Whereas, the DevOps + Automation Summit will be much more focused on the broader tools, methodologies, and concepts of DevOps and cloud.</p><p>There will still be quite a bit of PowerShell content at the Nashville event, and there could be some overlap of sessions - especially if a speaker submits a session that would be the right fit at both events. But you would be able to attend both and have enough unique content that it would be justifiable.</p><p><strong>How big will the new event be?</strong></p><p>While we&rsquo;ve set our initial budgets at the Nashville event for 250 people, we will be capping the event attendance to 400 for the time being. One of the things that we pride ourselves on is the ability to have a level of intimacy between the attendees, as well as the speakers. We have the additional capacity to grow in Nashville, but we don&rsquo;t want to do so in a way that compromises that.</p><p>We&rsquo;re looking forward to answering any questions that you may have. I may update this article as we get those questions so that everyone is on the same page. In the meantime, it was wonderful to see everyone again in Bellevue, and the team is looking forward to seeing all of you again next year!</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 3-May-2019</title><link>https://powershell.org/articles/2019-05-03-icymi-powershell-week-of-3-may-2019/</link><guid>https://powershell.org/articles/2019-05-03-icymi-powershell-week-of-3-may-2019/</guid><pubDate>Fri, 03 May 2019 14:20:27 +0000</pubDate><description>&lt;p&gt;Topics include GUI development, Azure Cloud Shell, Live streaming, Azure functions and more!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include GUI development, Azure Cloud Shell, Live streaming, Azure functions and more!</p><p>Special thanks to Mark Roloff and Robin Dadswelll</p><h6 id="new-video---handling-progress-with-a-background-job-in-a-gui-application" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#new-video---handling-progress-with-a-background-job-in-a-gui-application"/><a href="https://www.sapien.com/blog/2019/05/01/new-video-handling-progress-with-a-background-job-in-a-gui-application/"><em>New Video - Handling Progress with a Background Job in a GUI Application</em></a><a class="ps-heading-anchor" href="#new-video---handling-progress-with-a-background-job-in-a-gui-application" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Max Trinidad on May 1st</p><p>Learn how to create forms and have tasks running behind them with Sapien</p><h6 id="deploy-ssis-packages-with-powershell-ispac-deployment-using-the-ssis-provider" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#deploy-ssis-packages-with-powershell-ispac-deployment-using-the-ssis-provider"/><a href="http://sqlvariant.com/2019/05/deploy-ssis-packages-with-powershell-ispac-deployment-using-the-ssis-provider/"><em>Deploy SSIS Packages with PowerShell .ISPAC Deployment, using the SSIS Provider</em></a><a class="ps-heading-anchor" href="#deploy-ssis-packages-with-powershell-ispac-deployment-using-the-ssis-provider" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Aaron Neslon on May 1st</p><p>Learn an easy and repeatable way to deploy SSIS packages with PowerShell</p><h6 id="visualising-your-dns-cache-with-psgraph" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#visualising-your-dns-cache-with-psgraph"/><a href="https://ja.mesmontgomery.co.uk/2019/04/visualising-your-dns-cache-with-psgraph/"><em>Visualising your DNS cache with PSGraph</em></a><a class="ps-heading-anchor" href="#visualising-your-dns-cache-with-psgraph" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by James Montgomery on April 26th</p><p>Have a bit of fun with the PSGraph model and your DNS cache, who knows what more can be done from here!</p><h6 id="using-powershell-with-azure-cloud-shell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#using-powershell-with-azure-cloud-shell"/><a href="https://dev.to/azure/using-powershell-with-azure-cloud-shell-4iio"><em>Using PowerShell with Azure Cloud Shell</em></a><a class="ps-heading-anchor" href="#using-powershell-with-azure-cloud-shell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Michael Bender on April 27th</p><p>There are many ways to switch to PowerShell within the Azure Cloud Shell, find out more about them here!</p><h6 id="public-preview-of-powershell-in-azure-functions-2x" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#public-preview-of-powershell-in-azure-functions-2x"/><a href="https://devblogs.microsoft.com/powershell/public-preview-of-powershell-in-azure-functions-2-x/"><em>Public Preview of PowerShell in Azure Functions 2.x</em></a><a class="ps-heading-anchor" href="#public-preview-of-powershell-in-azure-functions-2x" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Joey Aiello on April 29th</p><p>An announcement from the project team for PowerShell Core</p><h6 id="reddit-rpowershell---most-popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#reddit-rpowershell---most-popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/bk1ic1/powershell_for_beginners/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Have a look through some suggestions for beginners or help out someone new, either way it&rsquo;s great to see the community helping one another out!</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#tweet-of-the-week"/><a href="https://twitter.com/PowerShellLive/status/1124052193060032512"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>A quick start quide to getting started streaming PowerShell live!</p><h6 id="youtube-pskoans-learn-powershell-concepts-using-pester-with-joel-sallow" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190503.md#youtube-pskoans-learn-powershell-concepts-using-pester-with-joel-sallow"/><a href="https://www.youtube.com/watch?v=ahYfLzqKDM0"><em>Youtube: PSKoans: Learn PowerShell concepts using Pester! with Joel Sallow</em></a><a class="ps-heading-anchor" href="#youtube-pskoans-learn-powershell-concepts-using-pester-with-joel-sallow" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>A forray into PSKoans, the goal of the PowerShell koans is to teach you PowerShell by presenting you with a set of questions. Each kōan (each question) is represented by a failing Pester test. Your goal is to make those tests pass by filling out the correct answer, or writing the correct code.</p>]]></content:encoded></item><item><title>Find-Module, Find-Script – Don't Recreate the Wheel</title><link>https://powershell.org/articles/2019-04-29-find-module-find-script-dont-recreate-the-wheel/</link><guid>https://powershell.org/articles/2019-04-29-find-module-find-script-dont-recreate-the-wheel/</guid><pubDate>Mon, 29 Apr 2019 18:52:07 +0000</pubDate><description>&lt;p&gt;The PowerShell Gallery is a collection of modules and scripts that is community driven to help us automate everyday tasks. Sometimes, we have an idea that could written into a function or script, however, most of the time, someone else had the same idea and published their work to the PowerShell Gallery. There is no need to recreate the wheel and re-write it, use the community to our advantage. We&amp;rsquo;ll take a look at multiple Cmdlets,&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The PowerShell Gallery is a collection of modules and scripts that is community driven to help us automate everyday tasks. Sometimes, we have an idea that could written into a function or script, however, most of the time, someone else had the same idea and published their work to the PowerShell Gallery. There is no need to recreate the wheel and re-write it, use the community to our advantage. We&rsquo;ll take a look at multiple Cmdlets,</p><p><code>Find-Module</code>,</p><p><code>Find-Script</code>,</p><p><code>Install-Module</code>, and</p><p><code>Install-Script</code>, and find out what each of them provide.</p><p><strong>Find-Module</strong><strong>and Install-Module</strong></p><p><code>Find-Module</code>allows us the</p><p><em>browse</em> the PowerShell Gallery and find if there is a module in the community that has been created. Running</p><p><code>Get-Help Find-Module</code>, we can see there are multiple parameters to use to help narrow our search. For demonstration, we will find the Azure PowerShell (Az) module by Microsoft using the</p><p><code>Find-Module</code>Cmdlet.</p><p>`Get-Help Find-Module
NAME
Find-Module
SYNTAX
Find-Module [[-Name] ] [-MinimumVersion ] [-MaximumVersion ] [-RequiredVersion ] [-AllVersions] [-IncludeDependencies] [-Filter ] [-Tag
] [-Includes {DscResource | Cmdlet | Function | RoleCapability}] [-DscResource ] [-RoleCapability ] [-Command ] [-Proxy ] [-ProxyCredential
] [-Repository ] [-Credential ] []
ALIASES
fimo
REMARKS
Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
&ndash; To download and install Help files for the module that includes this cmdlet, use Update-Help.
&ndash; To view the Help topic for this cmdlet online, type: &ldquo;Get-Help Find-Module -Online&rdquo; or
go to<a href="http://go.microsoft.com/fwlink/?LinkID=398574">http://go.microsoft.com/fwlink/?LinkID=398574</a>.
Find-Module -Name Az
Version Name Repository Description</p><hr><p>1.8.0 Az PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with WindowsPowerShell and P&hellip;
`Great. We were able to find the Az module and returned some information about the module: Version, Name, Repository, and Description. But what if we did not know the name of a module we are looking for? The</p><p><code>-Name</code>parameter accepts wildcards for partial searches, we can enter in</p><p><code>Find-Module -Name Az*</code>and will return any module in the gallery that starts with &ldquo;Az&rdquo;. We can also search for DSC Resources using the</p><p><code>Find-Module</code>Cmdlet using the</p><p><code>-Includes DscResource</code>parameter. This will only return DSC Resources available in the PowerShell Gallery</p><p><code>Find-Module -Name xWeb* -Includes DscResource</code>Once we found the module that we want to use, we can install the module using the</p><p><code>Install-Module</code>Cmdlet. This will install the community module in our default module install directory:</p><p><code>C:\Program Files\WindowsPowerShell\Modules</code>or if using PowerShell Core:</p><p><code>C:\Program Files\PowerShell\Modules</code>. Lets take the example above and use it to install the Az Module.</p><p><code>Find-Module -Name Az |Install-Module</code>We can take the</p><p><code>Find-Module</code>Cmdlet and pipe it to the</p><p><code>Install-Module</code>Cmdlet to install the module. But, we also have the ability to install a specific version of a module using the</p><p><code>-RequiredVersion</code>parameter.</p><p><code>Install-Module -Name Az -RequiredVersion 1.7</code>Not using the</p><p><code>-RequiredVersion</code>parameter will install the latest version of the module.</p><p><strong>Note:</strong> Find-Module and Install-Module was introduced in PowerShell version 5.0.</p><p><strong>Find-Script and Install-Script</strong></p><p><code>Find-Script</code>works the same way as</p><p><code>Find-Module</code>, however, instead of finding modules, we are now finding scripts.</p><p><code>Find-Script</code>will return</p><p><code>.ps1</code>scripts in the PowerShell Gallery that could be installed. Lets take a look at an example to find a script and than later on we will install it. The same rules apply when trying to find a script, we can use wildcards in our search to find a certain script.</p><p>`Find-Script -Name Get-*
Version Name Repository Description</p><hr><p>1.4 Get-WindowsAutoPilotInfo PSGallery This script uses WMI to retrieve properties needed by the Microsoft Store for Business to support Windows AutoPilot deplo&hellip;
1.0.0 Get-Quotation PSGallery Get-Quote cmdlet data harvests a/multiple quote(s) from Web outputs into your powershell console
1.0.0 Get-UsersOnlineOnReddit PSGallery Script to web data scrape reddit user trend and pump all the data points script captured from Reddit’s Powershell Communi&hellip;
1.0.4 Get-PacFile PSGallery This script will access updated information to create a PAC file to prioritize Microsoft 365 Urls for&hellip;
1.1.2.7 Get-AzureAutomationDiagnosticRes&hellip; PSGallery Capture diagnostic information for Azure Automation accounts. &hellip;
1.1.0 Get-VMotion PSGallery Report on recent vMotion events in your VMware environment.
1.2.1 Get-RemoteProgram PSGallery This function generates a list by querying the registry and returning the installed programs of a local or remote computer.
1.1 get-uptime PSGallery Get the uptime of the current machine.
1.0.1 Get-InstalledProgram PSGallery Get-InstalledProgram retrieves the programs installed on a local or remote machine. To specify a remote computer, use the&hellip;
0.0.1 Get-LockoutBlame PSGallery Script to get a Windows Event about Locked Accounts, including the host which caused the lockout&hellip;.
0.1.1 get-lastreboot PSGallery Get the last reboot information from multiple machines
1.0 Get-DnsConfiguration PSGallery Retrives primary, secondary, tertiery DNS Servers from on online system using Windows Management Instrimentation.
1.0 Get-Github PSGallery Download a github repository or a gist
1.1 Get-MyIP PSGallery Get your External IP address&hellip;
1.3.5 Get-WindowsUpTime PSGallery Get Windows UpTime StartTime and LocalTime by Wmi on local and remote system
2.9 Get-Parameter PSGallery Lists all the parameters of a command, by ParameterSet, including their aliases, type, etc&hellip;.
2.0 Get-LastLoggedOnUser PSGallery Gets the last not special user to have a loaded profile on a given system.
`We searched for all scripts that start with</p><p><code>Get-*</code>, now lets find the script we want to install:</p><p><code>Join-String</code>Find-Script -Name Join-String
Version Name Repository Description</p><hr><p>1.0 Join-String PSGallery Join String from Array
`Now that we found the scripts, lets install it using the same pipeline. Using the</p><p><code>Install-Script</code>Cmdlet, the script will install in the default script location:</p><p><code>C:\Program Files\WindowsPowerShell\Scripts</code>or if using PowerShell Core:</p><p><code>C:\Program Files\PowerShell\Scripts</code>.</p><p><code>Find-Script -Name Join-String |Install-Script</code>We can still use the</p><p><code>-RequiredVersion</code>parameter if a specified version is required, but using the command above will install the latest.</p><p><code>Find-Module</code>,</p><p><code>Find-Script</code>,</p><p><code>Install-Module</code>, and</p><p><code>Install-Script</code>are great to find and install modules or scripts from the PowerShell Gallery, there is no need to recreate the wheel, (Most of the time). You can also search the PowerShell Gallery by visiting the website</p><p><a href="https://www.powershellgallery.com/">here</a>. When searching for a module or script, the site will show you the command to run in PowerShell to install the module or script.</p><p>Just a reminder that these Cmdlets were introduced in PowerShell version 5.0 and are in the<a href="https://docs.microsoft.com/en-us/powershell/module/powershellget/?view=powershell-6">PowerShellGet</a> module. The links below are Microsoft&rsquo;s documentation for each Cmdlet with examples and other parameters that can be used.</p><p><a href="https://docs.microsoft.com/en-us/powershell/module/powershellget/Find-Module?view=powershell-6%EF%BB%BF">Find-Module</a><br><a href="https://docs.microsoft.com/en-us/powershell/module/powershellget/Install-Module?view=powershell-6%EF%BB%BF">Install-Module</a><br><a href="https://docs.microsoft.com/en-us/powershell/module/powershellget/Find-Script?view=powershell-6">Find-Script<br/><a href="https://docs.microsoft.com/en-us/powershell/module/powershellget/Install-Script?view=powershell-6">Install-Script</a></p><p>pwshliquori</p>
]]></content:encoded></item><item><title>Phenomenal number of ACLs, itty-bitty living space</title><link>https://powershell.org/articles/2019-04-26-phenomenal-number-of-acls-itty-bitty-living-space/</link><guid>https://powershell.org/articles/2019-04-26-phenomenal-number-of-acls-itty-bitty-living-space/</guid><pubDate>Fri, 26 Apr 2019 16:19:53 +0000</pubDate><description>&lt;p&gt;I recently had a need to backup file and folder ACLs for a client that would then need to restore them to their original objects following a hardware upgrade that would wipe them out. Easy enough, but the catch was that there was 1.5 million of them. Fortunately, getting ACLs in PowerShell is easy.&lt;/p&gt;
&lt;p&gt;`PS &amp;gt; Get-Acl -Path somefile.txt
Directory: C:&lt;br&gt;
Path Owner Access&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;somefile.txt BUILTIN\Administrators BUILTIN\Administrators Allow&amp;hellip;
`See?&lt;/p&gt;
&lt;p&gt;Now, if you needed multiple ACLs, say, all 1.5 million of them on a file share, you could use &lt;strong&gt;Get-ChildItem&lt;/strong&gt; to feed files and folders to &lt;strong&gt;Get-Acl&lt;/strong&gt;. But then what? &lt;strong&gt;Export-Clixml&lt;/strong&gt; is a generally great way to convert a PowerShell object to XML and save it to file.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I recently had a need to backup file and folder ACLs for a client that would then need to restore them to their original objects following a hardware upgrade that would wipe them out. Easy enough, but the catch was that there was 1.5 million of them. Fortunately, getting ACLs in PowerShell is easy.</p><p>`PS &gt; Get-Acl -Path somefile.txt
Directory: C:<br>
Path Owner Access</p><hr><p>somefile.txt BUILTIN\Administrators BUILTIN\Administrators Allow&hellip;
`See?</p><p>Now, if you needed multiple ACLs, say, all 1.5 million of them on a file share, you could use<strong>Get-ChildItem</strong> to feed files and folders to<strong>Get-Acl</strong>. But then what?<strong>Export-Clixml</strong> is a generally great way to convert a PowerShell object to XML and save it to file.</p><p><code>PS &gt; Get-Acl -Path somefile.txt | Export-Clixml -Path AclBackup.ps1xml</code>You then get an ugly monstrosity that looks like this.</p><p><img src="https://powershell.org/wp-content/uploads/2019/04/image.png" alt=""/><p>In my case, there&rsquo;s a serious problem with this approach. Ballpark 100 lines per ACL x 1.5 million filesystem objects = 150 million lines of backup data, and my small test on several thousand files and folders was already about 32MB on disk. In production, it would balloon to a hefty size and this needed to run on a server with 3.5GB of RAM and space constraints. Yeah&hellip; I&rsquo;m not offering that as a solution to anybody.</p><p>Luckily, we can do a little dotnet black magic to trim this down to something much more manageable. Thanks to sk82jack and Chris Dent in the PowerShell Discord, I learned that the<a href="https://docs.microsoft.com/en-us/windows/desktop/secauthz/security-descriptor-definition-language-for-conditional-aces-">SDDL</a> is the only component that&rsquo;s really necessary for recreating the ACL object. They look like this:</p><p><code>O:BAG:S-1-5-21-1192226125-608885206-469304335-1001D:AI(A;ID;FA;;;BA)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)</code>File ACLs are<strong>[System.Security.AccessControl.FileSecurity]</strong> type objects and folder ACLs are<strong>[System.Security.AccessControl.DirectorySecurity]</strong> type objects.</p><p>`PS &gt; [System.Security.AccessControl.FileSecurity]::new()
Path Owner Access</p><hr><p>`Instantiating one of these just gives us a blank object, but we can feed the SDDL as a string to the<strong>SetSecurityDescriptorSddlForm()</strong> method in order to populate it.</p><p>`PS &gt; $a = [System.Security.AccessControl.FileSecurity]::new()
PS &gt; $a.SetSecurityDescriptorSddlForm(&lsquo;O:BAG:S-1-5-21-1192226125-608885206-469304335-1001D:AI(A;ID;FA;;;BA)(A;ID;FA;;;SY)(A;ID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)&rsquo;)
PS &gt; $a
Path Owner Access</p><hr><pre><code> NT SERVICE\TrustedInstaller NT AUTHORITY\SYSTEM Allow Modify, Synchronize...</code></pre><p>`I haven&rsquo;t seen a way to fill in the path but that&rsquo;s easily worked around. Armed with this information, I would only need to backup the full path of each object, whether it is a file or a folder, and the SDDL.</p><p>`Get-ChildItem -Path C:\apps -Recurse | Foreach-Object {
[pscustomobject]@{
Path = $<em>.Fullname
IsContainer = $</em>.PSIsContainer
Sddl = $(Get-Acl -Path $_.Fullname).Sddl
}
}
Path IsContainer Sddl</p><hr><p>C:\apps\aclbackup.ps1xml False O:S-1-5-21-1192226125-608885206-469304335&hellip;
C:\apps\az_tenant2tenant.ps1 False O:BAG:S-1-5-21-1192226125-608885206-46930&hellip;
C:\apps\bb_saml_resp_success.xml False O:S-1-5-21-1192226125-608885206-469304335&hellip;
C:\apps\somefile.txt False O:S-1-5-21-1192226125-608885206-469304335&hellip;
C:\apps\testvnet.json False O:BAG:S-1-5-21-1192226125-608885206-46930&hellip;
`Now we&rsquo;re getting somewhere. Flat objects like this will export nicely to CSV, which would be significantly smaller on disk than the ps1xml we started with. When I run the code above against a directory tree with about 56k objects and pipe it to<strong>Export-Csv</strong>, I end up with a 16MB CSV. Some PowerShell napkin math to double-check this&hellip;</p><p><code>PS &gt; 16MB / 56000 299.593142857143 # Just shy of 300 bytes per ACL PS &gt; (300 * 1500000) / 1MB # Per ACL size by the number of ACLs, converted to MBs 429.153442382813</code>&hellip; So around 430MB. That sounds like a much more reasonable backup size to me and it won&rsquo;t chew through what little RAM I have to work with. If we went with<strong>Export-Clixml</strong>, it would have ended up around 8GB, taken significantly longer to run, and probably would have crashed.</p><p>So how would we restore these?</p><p><code>$ACLs = Import-Csv -Path AclsBackup.csv foreach ($ACL in $ACLs) { switch ($ACL.IsContainer) { $true { $AclObj = [System.Security.AccessControl.DirectorySecurity]::new() $AclObj.SetSecurityDescriptorSddlForm($ACL.Sddl) Set-Acl -Path $ACL.Path -AclObject $AclObj } $false { $AclObj = [System.Security.AccessControl.FileSecurity]::new() $AclObj.SetSecurityDescriptorSddlForm($ACL.Sddl) Set-Acl -Path $ACL.Path -AclObject $AclObj } } }</code>And simple as that the ACLs right back where they came from.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 26-April-2019</title><link>https://powershell.org/articles/2019-04-26-icymi-powershell-week-of-26-april-2019/</link><guid>https://powershell.org/articles/2019-04-26-icymi-powershell-week-of-26-april-2019/</guid><pubDate>Fri, 26 Apr 2019 15:00:53 +0000</pubDate><description>&lt;p&gt;Topics include building functions for cleaning your $PATH, xplat GUIs with Core, and the EXO module makes its way to the Cloud Shell.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include building functions for cleaning your $PATH, xplat GUIs with Core, and the EXO module makes its way to the Cloud Shell.</p><p>Special thanks to Robin Dadswell, Prasoon Karunan, and Mark Roloff.</p><h6 id="introducing-pscvss-a-powershell--powershell-core-module-to-calculate-a-cvss-score" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#introducing-pscvss-a-powershell--powershell-core-module-to-calculate-a-cvss-score"/><a href="https://www.secopshub.com/t/introducing-pscvss-a-powershell-powershell-core-module-to-calculate-a-cvss-score/743"><em>Introducing PSCVSS: A PowerShell &amp; PowerShell Core Module to calculate a CVSS Score</em></a><a class="ps-heading-anchor" href="#introducing-pscvss-a-powershell--powershell-core-module-to-calculate-a-cvss-score" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Josh Rickard on April 19th</p><p>In the security arena? Being able to locally calculate CVSS scores might be pretty handy for you, then.</p><h6 id="powershell-way-to-get-all-information-about-office-365-service-health" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#powershell-way-to-get-all-information-about-office-365-service-health"/><a href="https://evotec.xyz/powershell-way-to-get-all-information-about-office-365-service-health/"><em>PowerShell way to get all information about Office 365 Service Health</em></a><a class="ps-heading-anchor" href="#powershell-way-to-get-all-information-about-office-365-service-health" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Przemyslaw Klys on April 22nd</p><p>The title alone doesn&rsquo;t do much justice to how cool this is. Przemyslaw&rsquo;s new module pulls the service health out and fits it nicely into other visualization tools that he&rsquo;s published.</p><h6 id="more-powershell-adventures-in-cleaning-your-path" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#more-powershell-adventures-in-cleaning-your-path"/><a href="https://jdhitsolutions.com/blog/powershell/6700/more-powershell-adventures-in-cleaning-your-path/"><em>More PowerShell Adventures in Cleaning Your Path</em></a><a class="ps-heading-anchor" href="#more-powershell-adventures-in-cleaning-your-path" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jeffrey Hicks on April 24th</p><p>Follow along with Jeff as he walks you through building a few functions that can help you learn a little .NET and how to implement the<em>WhatIf</em> switch.</p><h6 id="building-cross-platform-wpf-style-applications-in-powershell-core" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#building-cross-platform-wpf-style-applications-in-powershell-core"/><a href="https://ironmansoftware.com/building-cross-platform-wpf-style-applications-in-powershell-core/"><em>Building Cross-Platform WPF-Style Applications in PowerShell Core</em></a><a class="ps-heading-anchor" href="#building-cross-platform-wpf-style-applications-in-powershell-core" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Driscoll on April 23rd</p><p>Xplatform GUIs are making their way to PS Core. Leveraging the Avalonia project, Adam&rsquo;s latest PowerShell Pro Tools update opens the door to creating XAML windows.</p><h6 id="customizing-the-title-bar-of-your-powershell-console-window" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#customizing-the-title-bar-of-your-powershell-console-window"/><a href="https://sid-500.com/2019/04/23/powershell-customizing-the-title-bar-of-your-powershell-console-window/"><em>Customizing the Title Bar of your PowerShell Console Window</em></a><a class="ps-heading-anchor" href="#customizing-the-title-bar-of-your-powershell-console-window" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Patrick Gruenauer on April 23rd</p><p>Want a little personal branding for presentations? Maybe toss something fun or uplifting into your shell&rsquo;s window? Patrick has you covered.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#tweet-of-the-week"/><a href="https://twitter.com/maertend33/status/1121103069867986944"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Making the Azure Cloud Shell even more appealing, the Exchange Online module is now available there.</p><h6 id="youtube-powershell-universal-dashboard-with-adam-driscoll" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190426.md#youtube-powershell-universal-dashboard-with-adam-driscoll"/><a href="https://www.youtube.com/watch?v=5LWXrgstfe8"><em>Youtube: Powershell Universal Dashboard with Adam Driscoll</em></a><a class="ps-heading-anchor" href="#youtube-powershell-universal-dashboard-with-adam-driscoll" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Speaking at the Austin PSUG, Adam gives a rundown on the Universal Dashboard.</p>]]></content:encoded></item><item><title>Azure DevOps – Enable "Allow scripts to access the OAuth token" using PowerShell</title><link>https://powershell.org/articles/2019-04-20-azure-devops-enable-allow-scripts-to-access-the-oauth-token-using-powershell/</link><guid>https://powershell.org/articles/2019-04-20-azure-devops-enable-allow-scripts-to-access-the-oauth-token-using-powershell/</guid><pubDate>Sat, 20 Apr 2019 23:20:30 +0000</pubDate><description>&lt;p&gt;Azure DevOps allows us to run custom scripts to help our software and infrastructure get delivered quickly. There are times that the scripts run without an issue, however, sometimes there is a need to invoke the Azure DevOps Rest API in the release pipeline to get our scripts running. Sure, you can create a script invoking the API, authenticating with Azure DevOps with your personal access token and should work, but there is a better solution.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Azure DevOps allows us to run custom scripts to help our software and infrastructure get delivered quickly. There are times that the scripts run without an issue, however, sometimes there is a need to invoke the Azure DevOps Rest API in the release pipeline to get our scripts running. Sure, you can create a script invoking the API, authenticating with Azure DevOps with your personal access token and should work, but there is a better solution.</p><p>Allowing scripts to access the OAuth token authenticates the script with the</p><p><code>System.AccessToken</code>variable, which runs as the Project Collection Build Service, a built-in service account in Azure DevOps. Today, we will be taking a look on how to enable this feature using PowerShell.</p><p>Since the feature needs to be enabled per release definition, the first item we need to find is the definitionId of the release definition. This can be found by using the Rest API or in the URL when clicking on the release definition in Azure DevOps. Since we are using PowerShell, let’s try it, but first, be sure to have your personal access token handy. The below commands are for my own blog organization, please substitute with your organization and project name. There will be a function provided at the end that parameterizes these values.</p><p><code>$Params = @{ Uri = "https://vsrm.dev.azure.com/pwshliquori-blog/blog/_apis/release/definitions/1?api-version=5.0" Headers = @{ Authorization = "Basic $PersonalAccessToken" } } $Def = Invoke-RestMethod @Params</code>Let’s take a look at the command:</p><ul><li><p>$Params: A hash table we will splat when we are ready to run the command.</p></li><li><p>$Params.Uri: The components needed to get the release definitions.</p></li><li><p>pwshliquori-blog: Organization name.</p></li><li><p>blog: Project name.</p></li><li><p>_apis: Standard for calling the rest API.</p></li><li><p>release: The area of the API call.</p></li><li><p>definitions: The resource of the API call.</p></li><li><p>api-version=5.0: The latest version of the API.</p></li><li><p>$Headers: Authorization header using your base 64 encoded personal access token.</p></li><li><p>Invoke-RestMethod @Params: Invokes the Rest API splatting the $Params hashtable.</p></li></ul><p>The command should return the release definition in the project with definitionId 1. Now we need to dig down and find the property needed to enable, in this case: “enableAccessToken.”</p><p>The &ldquo;enableAccessToken&rdquo; property is set to false by default, lets find and set it to true:</p><p><code>$Def.environments.deployPhases.deploymentInput parallelExecution : @{parallelExecutionType=none} skipArtifactsDownload : False artifactsDownloadInput : @{downloadInputs=System.Object[]} queueId : 3 demands : {} enableAccessToken : False timeoutInMinutes : 0 jobCancelTimeoutInMinutes : 1 condition : succeeded() overrideInputs : $Def.environments.deployPhases.deploymentInput.enableAccessToken = $true $Def.environments.deployPhases.deploymentInput parallelExecution : @{parallelExecutionType=none} skipArtifactsDownload : False artifactsDownloadInput : @{downloadInputs=System.Object[]} queueId : 3 demands : {} enableAccessToken : True timeoutInMinutes : 0 jobCancelTimeoutInMinutes : 1 condition : succeeded() overrideInputs :</code>Now that we set the “enableAccessToken” to true, we need to update the release definition with the changed value. To do this, we need to convert the $Def variable to JSON format and set the ContentType to application/json.</p><p><code>$Body = ConvertTo-Json -InputObject $Def -Depth 10 $Params = @{ Uri = "https://dev.azure.com/pwshliquori-blog/blog/_apis/release/definitions/1?api-version=5.0" Headers = @{ Authorization = "Basic $ConvertToBase64" } Body = $Body ContentType = 'application/json Method = 'Put' } Invoke-RestMethod @Params</code>The body needs to contain the entire release definition with the updated “enableAccessToken” property. After running the command, we can now utilize the</p><p><code>System.AccessToken</code>to run scripts and processes using OAuth authentication that uses the Project Collection Build Service account. By using PowerShell, we can now turn the commands above into a function to automate the process of enabling this feature.</p><p><code>function Enable-AzureDevOpsReleaseDefinitionOAuthToken { [CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline, Position = 0)] [string]$OrganizationName, [Parameter(Mandatory, ValueFromPipeline, Position = 1)] [string]$ProjectName, [Parameter(Mandatory, Position = 2)] [string]$ReleaseDefinitionId, [Parameter(Position = 3)] [string]$PersonalAccessToken ) Begin { $BasicAuth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f '', $PersonalAccessToken))) } Process { Try { $Params = @{ Uri = "https://vsrm.dev.azure.com/$OrganizationName/$ProjectName/_apis/release/definitions/$($ReleaseDefinitionId)?api-version=5.0" Headers = @{ Authorization = "Basic $BasicAuth" } } $ReleaseDefinition = Invoke-RestMethod @Params $ReleaseDefinition.environments |ForEach-Object { $_.deployPhases.deploymentinput.enableAccessToken = $true } $JsonObject = foreach ($Definition in $ReleaseDefinition) { ConvertTo-Json -InputObject $Definition -Depth 10 } $Params.Method = 'Put' $Params.ContentType = 'application/json' foreach ($Json in $JsonObject) { $Params.Body = $Json Invoke-RestMethod @Params } } Catch { throw $_ } } }</code>The function will enable the OAuth token for all environments in the given release definition, which gives us the option to use the</p><p><code>System.AccessToken</code>variable. This is handy when we want to run custom scripts without using our own personal access token. Another example is if we needed to create an annotated tag for a release and need to use the Build Service Account to tag the release instead of a release administrators personal access token.</p><p>For purposes of this post, I have provided one function, but this should be split into two separate functions. One function to get the release definition, and then next to enable the OAuth token, taking an</p><p><code>InputObject</code>parameter. As the legendary Don Jones states &ldquo;A function is a tool that should do one thing really well.&rdquo;</p><p>To find more information on using the Rest API, visit Microsoft documentation on the Azure DevOps Rest API.</p><p><a href="https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.0">https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.0</a></p><p>pwshliquori</p>
]]></content:encoded></item><item><title>Get-Command – One of the best Cmdlets besides Get-Help</title><link>https://powershell.org/articles/2019-04-19-get-command-one-of-the-best-cmdlets-besides-get-help/</link><guid>https://powershell.org/articles/2019-04-19-get-command-one-of-the-best-cmdlets-besides-get-help/</guid><pubDate>Fri, 19 Apr 2019 16:59:06 +0000</pubDate><description>&lt;p&gt;So laying on the sofa, sick, bored out of my mind, what better way to spend my time then writing a blog post about&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Get-Command &lt;/code&gt;. The&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Get-Command &lt;/code&gt;Cmdlet is apart of the Microsoft.PowerShell.Core module, it was introduced in PowerShell version 1.0 and is one of the most useful Cmdlets to find a command you are looking for. It has a variety of parameters that allow you to search for a command by using a combination of parameters or just using&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>So laying on the sofa, sick, bored out of my mind, what better way to spend my time then writing a blog post about</p><p><code>Get-Command</code>. The</p><p><code>Get-Command</code>Cmdlet is apart of the Microsoft.PowerShell.Core module, it was introduced in PowerShell version 1.0 and is one of the most useful Cmdlets to find a command you are looking for. It has a variety of parameters that allow you to search for a command by using a combination of parameters or just using</p><p><code>Get-Command</code>on its own. Go ahead and run</p><p><code>Get-Command</code>in your console before continuing with this post. As you can see, it returns all commands that are available in your PowerShell session. Later on, we will go through several example on how we can leverage the parameters to find specifics commands.</p><p>Lets start with a basic example and then build on it to get a specific command,</p><p><code>Get-ADUser</code>. First, lets get all of the command that are already imported into our PowerShell session.</p><p>`Get-Command -ListImported
CommandType Name Version Source</p><hr><p>Function New-HiiDistributionGroup 1.0.0.0 ExchangeTools
Function New-HiiExchangeSession 1.0.0.0 ExchangeTools
Function New-HiiMailContact 1.0.0.0 ExchangeTools
Function Add-HiiSmtpEmailAddress 1.0.0.0 ExchangeTools
Function New-HiiMailbox 1.0.0.0 ExchangeTools
Function New-HiiUserMailboxDistributionList 1.0.0.0 ExchangeTools
Function Get-HiiSmtpEmailAddress 1.0.0.0 ExchangeTools
Function Add-HiiDistributionGroupMember 1.0.0.0 ExchangeTools
Function Remove-HiiSmtpEmailAddress 1.0.0.0 ExchangeTools
Function Export-HiiMailboxToPST 1.0.0.0 ExchangeTools
Cmdlet Remove-Job 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Register-PSSessionConfiguration 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Get-Help 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Remove-Module 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Out-Null 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Receive-Job 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Receive-PSSession 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Register-ArgumentCompleter 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Get-History 3.0.0.0 Microsoft.PowerShell.Core
Cmdlet Get-Job 3.0.0.0 Microsoft.PowerShell.Core
`The output does not have any Cmdlets from the ActiveDirectory module we need to find the</p><p><code>GetADUser</code>. If you have RSAT Tools installed, import the module using</p><p><code>Import-Module ActiveDirectory</code>and re-run</p><p><code>Get-Command -ListImported</code>. As you can see now, a list of Active Directory Cmdlets are available. We can now start getting more complex to find</p><p><code>Get-ADUser</code>.</p><p>Lets get limit the scope of our command to get only the ActiveDirectory module Cmdlets that are available.</p><p>`Get-Command -Module ActiveDirectory
CommandType Name Version Source</p><hr><p>Cmdlet Add-ADCentralAccessPolicyMember 1.0.1.0 activedirectory
Cmdlet Add-ADComputerServiceAccount 1.0.1.0 activedirectory
Cmdlet Add-ADDomainControllerPasswordReplicationPolicy 1.0.1.0 activedirectory
Cmdlet Add-ADFineGrainedPasswordPolicySubject 1.0.1.0 activedirectory
Cmdlet Add-ADGroupMember 1.0.1.0 activedirectory
Cmdlet Add-ADPrincipalGroupMembership 1.0.1.0 activedirectory
Cmdlet Add-ADResourcePropertyListMember 1.0.1.0 activedirectory
Cmdlet Clear-ADAccountExpiration 1.0.1.0 activedirectory
Cmdlet Clear-ADClaimTransformLink 1.0.1.0 activedirectory
Cmdlet Disable-ADAccount 1.0.1.0 activedirectory
Cmdlet Disable-ADOptionalFeature 1.0.1.0 activedirectory
Cmdlet Enable-ADAccount 1.0.1.0 activedirectory
Cmdlet Enable-ADOptionalFeature 1.0.1.0 activedirectory
Cmdlet Get-ADAccountAuthorizationGroup 1.0.1.0 activedirectory
Cmdlet Get-ADAccountResultantPasswordReplicationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADAuthenticationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADAuthenticationPolicySilo 1.0.1.0 activedirectory
Cmdlet Get-ADCentralAccessPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADCentralAccessRule 1.0.1.0 activedirectory
Cmdlet Get-ADClaimTransformPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADClaimType 1.0.1.0 activedirectory
Cmdlet Get-ADComputer 1.0.1.0 activedirectory
`Now we filtered only the ActiveDirectory module and can now filter down even more.</p><p><code>Get-Command</code>has a parameter</p><p><code>-Verb</code>that allows us to filter by using the verb of the Cmdlet (e.g. Get, Set, Import, Reset). Lets filter by verb</p><p><code>Get</code>and view the output.</p><p>`Get-Command -Module ActiveDirectory -Verb Get
CommandType Name Version Source</p><hr><p>Cmdlet Get-ADAccountAuthorizationGroup 1.0.1.0 activedirectory
Cmdlet Get-ADAccountResultantPasswordReplicationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADAuthenticationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADAuthenticationPolicySilo 1.0.1.0 activedirectory
Cmdlet Get-ADCentralAccessPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADCentralAccessRule 1.0.1.0 activedirectory
Cmdlet Get-ADClaimTransformPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADClaimType 1.0.1.0 activedirectory
Cmdlet Get-ADComputer 1.0.1.0 activedirectory
Cmdlet Get-ADComputerServiceAccount 1.0.1.0 activedirectory
Cmdlet Get-ADDCCloningExcludedApplicationList 1.0.1.0 activedirectory
Cmdlet Get-ADDefaultDomainPasswordPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADDomain 1.0.1.0 activedirectory
Cmdlet Get-ADDomainController 1.0.1.0 activedirectory
Cmdlet Get-ADDomainControllerPasswordReplicationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADDomainControllerPasswordReplicationPolicy&hellip; 1.0.1.0 activedirector
`Great! we now have all Cmdlets that start with the verb</p><p><code>Get</code>. Lets keep building, another parameter</p><p><code>-Noun</code>. We know the prefix for most ActiveDirectory Cmdlets start with AD, so lets use the noun User and see what the output is.</p><p>`Get-Command -Module ActiveDirectory -Verb Get -Noun *User
CommandType Name Version Source</p><hr><p>Cmdlet Get-ADUser 1.0.1.0 activedirectory
`Success! We found exactly the command we needed to. But did you notice the</p><p><code>*</code>character in the noun parameter? This is because we know the prefix is</p><p><code>AD</code>and the noun parameter acts as a filter, this tells PowerShell to find anything that has User in the noun. You can do the same for the parameter</p><p><code>-Verb</code>.</p><p>So now what? We found the command, but what else can we do with</p><p><code>Get-Command</code>. Besides just getting the command, we can get syntax, command info, or search by parameter type or parameter name. Lets see the syntax of</p><p><code>Get-ADUser</code>so we can better understand what it does.</p><p><code>Get-Command -Module ActiveDirectory -Verb Get -Noun *User -Syntax Get-ADUser -Filter [-AuthType ] [-Credential ] [-Properties ] [-ResultPageSize ] [-ResultSetSize ] [-SearchBase ] [-SearchScope ] [-Server ] [] Get-ADUser [-Identity] [-AuthType ] [-Credential ] [-Partition ] [-Properties ] [-Server ] [] Get-ADUser -LDAPFilter [-AuthType ] [-Credential ] [-Properties ] [-ResultPageSize ] [-ResultSetSize ] [-SearchBase ] [-SearchScope ] [-Server ] []</code>We can now see the parameters and parameter types of each. This is a great way to understand how the Cmdlet works and how we can use it in our own code.</p><p>Now that we built our command to find just the</p><p><code>Get-ADUser</code>and get the syntax. Lets look at another example that searches for a certain parameter name</p><p><code>Identity</code>. Using the parameter</p><p><code>ParameterName</code>will allow us to filter through Cmdlets in the ActiveDirectory module that has an</p><p><code>-Identity</code>parameter.</p><p>`Get-Command -Module ActiveDirectory -ParameterType IdentityCommandType Name Version Source</p><hr><p>Cmdlet Add-ADCentralAccessPolicyMember 1.0.1.0 activedirectory
Cmdlet Add-ADComputerServiceAccount 1.0.1.0 activedirectory
Cmdlet Add-ADDomainControllerPasswordReplicationPolicy 1.0.1.0 activedirectory
Cmdlet Add-ADFineGrainedPasswordPolicySubject 1.0.1.0 activedirectory
Cmdlet Add-ADGroupMember 1.0.1.0 activedirectory
Cmdlet Add-ADPrincipalGroupMembership 1.0.1.0 activedirectory
Cmdlet Add-ADResourcePropertyListMember 1.0.1.0 activedirectory
Cmdlet Clear-ADAccountExpiration 1.0.1.0 activedirectory
Cmdlet Clear-ADClaimTransformLink 1.0.1.0 activedirectory
Cmdlet Disable-ADAccount 1.0.1.0 activedirectory
Cmdlet Disable-ADOptionalFeature 1.0.1.0 activedirectory
Cmdlet Enable-ADAccount 1.0.1.0 activedirectory
Cmdlet Enable-ADOptionalFeature 1.0.1.0 activedirectory
Cmdlet Get-ADAccountAuthorizationGroup 1.0.1.0 activedirectory
Cmdlet Get-ADAccountResultantPasswordReplicationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADAuthenticationPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADAuthenticationPolicySilo 1.0.1.0 activedirectory
Cmdlet Get-ADCentralAccessPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADCentralAccessRule 1.0.1.0 activedirectory
Cmdlet Get-ADClaimTransformPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADClaimType 1.0.1.0 activedirectory
Cmdlet Get-ADComputer 1.0.1.0 activedirectory
Cmdlet Get-ADComputerServiceAccount 1.0.1.0 activedirectory
Cmdlet Get-ADDefaultDomainPasswordPolicy 1.0.1.0 activedirectory
Cmdlet Get-ADDomain 1.0.1.0 activedirectory
`We have found all of the command that have a parameter name of</p><p><code>Identity</code>. For purposes, there are a limited set listed above, the actual total number of Cmdlets that have the parameter of</p><p><code>Identity</code>is 117.</p><p>The last two parameters to take a look at are the</p><p><code>-Name</code>and</p><p><code>-ShowCommandInfo</code>parameters. If we already know the Cmdlet name and want to find which module it is in, we can use the</p><p><code>-Name</code>parameter and view the Source.</p><p>`Get-Command -Name Get-ADUser
CommandType Name Version Source</p><hr><p>Cmdlet Get-ADUser 1.0.1.0 activedirectory
`The command found the Cmdlet and is found in the ActiveDirectory module. The final parameter will build on the previous example, but we will add the</p><p><code>-ShowCommandInfo</code>parameter. The</p><p><code>-ShowCommandInfo</code>show the information pertaining to the command you a attempting to get.</p><p><code>Get-Command -Name Get-ADUser -ShowCommandInfo Name : Get-ADUser ModuleName : activedirectory Module : @{Name=activedirectory} CommandType : Cmdlet Definition : Get-ADUser -Filter [-AuthType ] [-Credential ] [-Properties ] [-ResultPageSize ] [-ResultSetSize ] [-SearchBase ] [-SearchScope ] [-Server ] [] Get-ADUser [-Identity] [-AuthType ] [-Credential ] [-Partition ] [-Properties ] [-Server ] [] Get-ADUser -LDAPFilter [-AuthType ] [-Credential ] [-Properties ] [-ResultPageSize ] [-ResultSetSize ] [-SearchBase ] [-SearchScope ] [-Server ] [] ParameterSets : {@{Name=Filter; IsDefault=True; Parameters=System.Management.Automation.PSObject[]}, @{Name=Identity; IsDefault=False; Parameters=System.Management.Automation.PSObject[]}, @{Name=LdapFilter; IsDefault=False; Parameters=System.Management.Automation.PSObject[]}}</code>Now we can see all of the information in the</p><p><code>Get-ADUser</code>Cmdlet, including syntax information.</p><p>We took a look at multiple examples of the</p><p><code>Get-Command</code>Cmdlet that can help us build tools in our scripts and module. It is a very help tool and that is why, (IMHO), it is one of the best Cmdlets to use besides</p><p><code>Get-Help</code>. To find out more information about</p><p><code>Get-Command</code>view Microsoft&rsquo;s documentation.</p><p><a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/get-command?view=powershell-6">Get-Command</a></p><p>Note: At the time of writing this post, PowerShell is in version 6. The</p><p><code>-ShowCommandInfo</code>parameter was introduced in PowerShell version 5.0.</p><p>Update: Get-Command was introduced in PowerShell v1.0, not 3.0. Thanks to Ryan Yates for the correction. Microsoft&rsquo;s docs on Get-Command only goes back to v3.0.</p><p>pwshliquori</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 19-April-2019</title><link>https://powershell.org/articles/2019-04-19-icymi-powershell-week-of-19-april-2019/</link><guid>https://powershell.org/articles/2019-04-19-icymi-powershell-week-of-19-april-2019/</guid><pubDate>Fri, 19 Apr 2019 15:00:35 +0000</pubDate><description>&lt;p&gt;Topics include DSC, Pester, validation attributes, and Azure AD.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include DSC, Pester, validation attributes, and Azure AD.</p><p>Special thanks to Robin Dadswell and Mark Roloff.</p><h6 id="defensive-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190419.md#defensive-powershell"/><a href="https://medium.com/@cjkuech/defensive-powershell-with-validation-attributes-8e7303e179fd"><em>Defensive PowerShell</em></a><a class="ps-heading-anchor" href="#defensive-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Christopher Kuech on April 13th</p><p>Did you know that you can use validation attributes outside of a<em>param</em> block? Mind. Blown.</p><h6 id="desired-state-configuration-dsc--get-started" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190419.md#desired-state-configuration-dsc--get-started"/><a href="https://nedimmehic.org/2019/04/16/desired-state-configuration-dsc-get-started/"><em>Desired State Configuration (DSC) – Get Started</em></a><a class="ps-heading-anchor" href="#desired-state-configuration-dsc--get-started" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Nedim Mehic on April 16th</p><p>If you&rsquo;re still looking to get your feet wet with DSC, this is one of the more detailed intros we&rsquo;ve run across and is well worth your time.</p><h6 id="get-users-from-azure-ad-with-a-large-number-of-registered-devices" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190419.md#get-users-from-azure-ad-with-a-large-number-of-registered-devices"/><a href="https://byteben.com/bb/get-users-from-azure-ad-with-a-large-number-of-registered-devices/"><em>Get Users from Azure AD with a large number of Registered Devices</em></a><a class="ps-heading-anchor" href="#get-users-from-azure-ad-with-a-large-number-of-registered-devices" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Ben Whitmore on April 16th</p><p>A quick and easy way to report on the number of registered devices for multiple users, rather than one at a time.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190419.md#tweet-of-the-week"/><a href="https://twitter.com/ADTipsTricks/status/664261417588146176"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Here&rsquo;s a fun graphical cheatsheet for various PowerShell concepts.</p><h6 id="youtube-socal-powershell-kevin-marquette-unplugged" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190419.md#youtube-socal-powershell-kevin-marquette-unplugged"/><a href="https://youtu.be/hRhFwDnneJw"><em>Youtube: SoCal PowerShell: Kevin Marquette Unplugged</em></a><a class="ps-heading-anchor" href="#youtube-socal-powershell-kevin-marquette-unplugged" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Kevin Marquette talks some shop before jumping into debugging with VSCode.</p><h6 id="youtube-pester-why-you-should--be-using-pester-with-jonathan-moss" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190419.md#youtube-pester-why-you-should--be-using-pester-with-jonathan-moss"/><a href="https://www.youtube.com/watch?v=FP7W4kP7Dig"><em>Youtube: Pester: Why You Should -Be Using Pester with Jonathan Moss</em></a><a class="ps-heading-anchor" href="#youtube-pester-why-you-should--be-using-pester-with-jonathan-moss" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From the Raleigh Triangle User Group, Jonathon Moss will sell you on using Pester.</p>]]></content:encoded></item><item><title>Learn To Use Verbose Output Streams In Your Pester Tests</title><link>https://powershell.org/articles/2019-04-18-learn-to-use-verbose-output-streams-in-your-pester-tests/</link><guid>https://powershell.org/articles/2019-04-18-learn-to-use-verbose-output-streams-in-your-pester-tests/</guid><pubDate>Thu, 18 Apr 2019 19:51:31 +0000</pubDate><description>&lt;p&gt;I&amp;rsquo;m going to file this under &amp;ldquo;Either I&amp;rsquo;m a genius, or there&amp;rsquo;s a much better way and everyone knows it except for me.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I recently began adding a suite of Pester tests to one of my projects and I found myself needing to mock some unit tests against a particular function that would modify a variable based on the parameter specified. Since all the functions I write nowadays are considered advanced functions (and yours should be too, they&amp;rsquo;re free!), I discovered a nice way to test the function&amp;rsquo;s actions using the&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I&rsquo;m going to file this under &ldquo;Either I&rsquo;m a genius, or there&rsquo;s a much better way and everyone knows it except for me.&rdquo;</p><p>I recently began adding a suite of Pester tests to one of my projects and I found myself needing to mock some unit tests against a particular function that would modify a variable based on the parameter specified. Since all the functions I write nowadays are considered advanced functions (and yours should be too, they&rsquo;re free!), I discovered a nice way to test the function&rsquo;s actions using the</p><p><code>-Verbose</code>stream output.</p><blockquote/><blockquote><p>Full source code for these examples is available on the Pester branch of my KaceSMA project<a href="https://github.com/ArtisanByteCrafter/KaceSMA/tree/pester">on GitHub</a></p></blockquote><h2 id="a-real-world-example" class="ps-heading wp-block-heading">A Real World Example<a class="ps-heading-anchor" href="#a-real-world-example" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>I&rsquo;m going to use a public function Get-SmaAsset for this example. For this particular function, I&rsquo;m wrapping an API call and passing a specific endpoint as a string, determined by the parameter set(s) given. Here is the relevant bit of code:</p><p><code>Begin { $Endpoint = '/api/asset/assets/' If ($AssetID) { $Endpoint = "/api/asset/assets/$AssetID/" If ($AsBarcodes) { $Endpoint = "/api/asset/assets/$AssetID/barcodes" } } }</code>We see</p><p><code>$Endpoint</code>being dynamically defined according to the parameters fed to the parent</p><p><code>Get-SmaAsset</code>function. I needed to ensure that the correct value of</p><p><code>$Endpoint</code>was being fed to the next part of the chain, which was the</p><p><code>Invoke-RestMethod</code>call to the API itself. The last thing I want to debug is why my API call is hitting the wrong endpoint. (Not to mention the potentially disastrous results when HTTP methods other than GET are used!)</p><p>You don&rsquo;t need an intimate knowledge of the project to understand what&rsquo;s going on here - I&rsquo;m really just wanting to make sure that this particular function only uses a single GET method, and that it calls the correct endpoint. An easy way to do this is by leveraging the verbose output stream to ensure that</p><p><code>Get-SmaAsset</code>is in fact, seeking out the correct endpoint with the correct HTTP method.</p><p>Here&rsquo;s part of what the function returns when run verbosely under normal circumstances:</p><p><code>PS&gt; Get-SmaAsset -Server 'https://server.example.com' -Credential (Get-Credential) -Verbose VERBOSE: Performing the operation "GET /api/asset/assets/" on target "https://server.example.com".</code>## Plugging It Into Pester {.wp-block-heading}</p><p>Pester is the perfect tool to test that my API calls go out consistently every time, and to do so I just need to use the Verbose output stream, then mock some response data, and then I should get a pretty clear idea exactly what is going on within my function scope.</p><p>Let&rsquo;s see what the &lsquo;Backend Calls&rsquo; context block looks like for this particular test:</p><p><code>Context 'Backend Calls' { Mock New-ApiGetRequest { } -ModuleName KaceSMA Mock New-ApiPostRequest { } -ModuleName KaceSMA Mock New-ApiPutRequest { } -ModuleName KaceSMA Mock New-ApiDeleteRequest { } -ModuleName KaceSMA $MockCred = New-Object System.Management.Automation.PSCredential ('fooUser', (ConvertTo-SecureString 'bar' -AsPlainText -Force)) $GenericParams = @{ Server = 'https://foo' Credential = $MockCred Org = 'Default' QueryParameters = "?paging=50" } $AssetIDParams = @{ Server = 'https://foo' Credential = $MockCred Org = 'Default' AssetID = '1234' QueryParameters = "?paging=50" } $AsBarcodesParams = @{ Server = 'https://foo' Credential = $MockCred Org = 'Default' AssetID = '1234' AsBarcodes = $True QueryParameters = "?paging=50" } Get-SmaAsset @AssetIDParams It 'should call New-ApiGETRequest' { Assert-MockCalled -CommandName New-ApiGETRequest -ModuleName KaceSMA -Times 1 } It 'should not call additional HTTP request methods' { $Methods = @('POST', 'DELETE', 'PUT') Foreach ($Method in $Methods) { Assert-MockCalled -CommandName ("New-Api$Method" + "Request") -ModuleName KaceSMA -Times 0 } } It "should call generic endpoint if AssetID parameter is NOT specified" { $Generic = $(Get-SmaAsset @GenericParams -Verbose) 4&gt;&amp;1 $Generic | Should -Be 'Performing the operation "GET /api/asset/assets" on target "https://foo".' } It "should call AssetID endpoint if AssetID parameter is specified" { $WithAssetID = $(Get-SmaAsset @AssetIDParams -Verbose) 4&gt;&amp;1 $WithAssetID | Should -Be 'Performing the operation "GET /api/asset/assets/1234" on target "https://foo".' } It "should call AsBarcodes endpoint if AsBarcodes parameter is specified" { $AsBarcodes = $(Get-SmaAsset @AsBarcodesParams -Verbose) 4&gt;&amp;1 $AsBarcodes | Should -Be 'Performing the operation "GET /api/asset/assets/1234/barcodes" on target "https://foo".' } }</code>Now, let&rsquo;s focus on a single test. This is where the &lsquo;cool&rsquo; factor of output streams comes into play. $Generic performs a mocked call to our function, which has a curious bit at the end,</p><p><code>4&gt;&amp;1</code>.</p><p><code>It "should call generic endpoint if AssetID parameter is NOT specified" { $Generic = $(Get-SmaAsset @GenericParams -Verbose) 4&gt;&amp;1 $Generic | Should -Be 'Performing the operation "GET /api/asset/assets" on target "https://foo".' }</code>What this does is take the verbose output stream (</p><p><code>4</code>) and redirect it to stdout (</p><p><code>&gt;&amp;1</code>) for our test to report on. The beauty of this is in it&rsquo;s simplicity. We don&rsquo;t have to modify anything in our code itself since it&rsquo;s an advanced function, and</p><p><code>-Verbose</code>is included by default.</p><p>When we do this we get several key benefits. By explicitly stating the known-good verbose output in our tests, it would begin failing if any of these scenarios occurred in our codebase:</p><ul><li><p>If the endpoint is changed intentionally</p></li><li><p>If the endpoint selection logic is flawed</p></li><li><p>If the HTTP method declared is changed</p></li><li><p>If the HTTP Method is ever used more than once</p></li></ul><p>I hope this has been helpful in exploring how the verbose output stream can help detect stealthy bugs in your codebase.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 12-April-2019</title><link>https://powershell.org/articles/2019-04-12-icymi-powershell-week-of-12-april-2019/</link><guid>https://powershell.org/articles/2019-04-12-icymi-powershell-week-of-12-april-2019/</guid><pubDate>Fri, 12 Apr 2019 15:00:00 +0000</pubDate><description>&lt;p&gt;Topics include splatting, PSRemoting to Azure VMs, and honey users.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include splatting, PSRemoting to Azure VMs, and honey users.</p><p>Special thanks to Robin Dadswell and Mark Roloff</p><h6 id="moving-my-blog-comments-from-disqus-to-github-issues-using-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190412.md#moving-my-blog-comments-from-disqus-to-github-issues-using-powershell"/><a href="https://lazywinadmin.com/2019/04/moving_blog_comments.html"><em>Moving my blog comments from Disqus to Github issues using PowerShell</em></a><a class="ps-heading-anchor" href="#moving-my-blog-comments-from-disqus-to-github-issues-using-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by François-Xavier Cat on April 7th</p><p>More than a few fun goodies in here, from working with XML to using the PS GitHub module.</p><h6 id="powershell-tricks-splatting" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190412.md#powershell-tricks-splatting"/><a href="https://blog.destruktive.one/powershell-tricks-splatting/"><em>PowerShell tricks: Splatting</em></a><a class="ps-heading-anchor" href="#powershell-tricks-splatting" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Roberth Strand on April 5th</p><p>If you&rsquo;re not already splatting, take a look in here. All the cool kids are doing it and anyone that has to read your scripts later on will likely thank you. It&rsquo;s a very simple, yet seriously versatile addition to your toolbox.</p><h6 id="powershell-basics-connecting-to-vms-with-azure-psremoting" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190412.md#powershell-basics-connecting-to-vms-with-azure-psremoting"/><a href="https://techcommunity.microsoft.com/t5/ITOps-Talk-Blog/PowerShell-Basics-Connecting-to-VMs-with-Azure-PSRemoting/ba-p/428403"><em>PowerShell Basics: Connecting to VMs with Azure PSRemoting</em></a><a class="ps-heading-anchor" href="#powershell-basics-connecting-to-vms-with-azure-psremoting" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Michael Bender on April 10th</p><p>Whether from the comfort of your local shell or the Cloud Shell, remote PowerShell to your Azure VMs is quick and easy to get started with.</p><h6 id="bluehive" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190412.md#bluehive"/><a href="https://github.com/leeberg/BlueHive"><em>BlueHive</em></a><a class="ps-heading-anchor" href="#bluehive" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Built with Universal Dashboard, BlueHive is a utility that lets you create and manage honey users in your environment. Thanks for this awesome tool, Lee Berg!</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190412.md#reddit-rpowershell---popular-weekly-post"/><a href="https://old.reddit.com/r/PowerShell/comments/bbz6vj/i_got_a_job_for_my_ability_with_powershell_and_im/"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Less educational or interesting, and more encouraging. If you&rsquo;re on the fence with jumping deeper into PowerShell, here&rsquo;s someone sharing their story of how it helped kick their career up a few notches.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190412.md#tweet-of-the-week"/><a href="https://twitter.com/DanielSilv9/status/1116375543581216770"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Playing with</p><p><code>Invoke-WebRequest</code>is a little bit more fun with Chrome&rsquo;s DevTools letting you copy requests to your clipboard.</p>]]></content:encoded></item><item><title>Hear, Hear for Here-Strings</title><link>https://powershell.org/articles/2019-04-09-hear-hear-for-here-strings/</link><guid>https://powershell.org/articles/2019-04-09-hear-hear-for-here-strings/</guid><pubDate>Tue, 09 Apr 2019 01:40:55 +0000</pubDate><description>&lt;p&gt;Running commands in PowerShell that require a format that will not run natively in PowerShell could be a difficult task, or can it? PowerShell provides a way to store, for example, a JSON as a string, enter here-string. A here-string is a single or double quoted string in which the quotation marks are interpreted literally. An example would be invoking a Rest API that requires a JSON body. Lets take a look at an example and see how here-strings work.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Running commands in PowerShell that require a format that will not run natively in PowerShell could be a difficult task, or can it? PowerShell provides a way to store, for example, a JSON as a string, enter here-string. A here-string is a single or double quoted string in which the quotation marks are interpreted literally. An example would be invoking a Rest API that requires a JSON body. Lets take a look at an example and see how here-strings work.</p><p>Trying to store JSON in a variable will return the following error:</p><p>`$Body =
{
&ldquo;apple&rdquo;: [
&ldquo;red&rdquo;,
&ldquo;green&rdquo;
],
&ldquo;grape&rdquo;: [
&ldquo;green&rdquo;,
&ldquo;red&rdquo;
],
&ldquo;blueberry&rdquo;: &ldquo;blue&rdquo;
}
At line:3 char:12</p><ul><li><pre><code>"apple": [</code></pre></li><li><pre><code> ~</code></pre></li></ul><p>Unexpected token &lsquo;:&rsquo; in expression or statement.
At line:6 char:6</p><ul><li><pre><code>],</code></pre></li><li><pre><code> ~</code></pre></li></ul><p>Missing argument in parameter list.
At line:10 char:6</p><ul><li><pre><code>],</code></pre></li><li><pre><code> ~</code></pre></li></ul><p>Missing argument in parameter list.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
`Oh man&hellip; What happened? PowerShell does not understand what is being done and throws an error for an unexpected token. Lets declare this as a here-string by using</p><p><code>@'</code>at the start and end of the JSON variable.</p><p><code>$Body = @' { "apple": [ "red", "green" ], "grape": [ "green", "red" ], "blueberry": "blue" } '@</code>Great! No errors were thrown, but… Why?</p><p>Notice the</p><p><code>@'</code>at the beginning and end, this tells PowerShell to create a here-string and store this string in a variable. Also, a rule to follow: the</p><p><code>@'</code>must be on their own line at the start and end of the declaration or the here-string will not be declared.</p><p><code># This will not work, PowerShell will not throw an error, but thinks you are still working to create something. $Body = @'{ "apple": [ "red", "green" ], "grape": [ "green", "red" ], "blueberry": "blue" } '@</code>We can also store variables in a here-string, but that requires double quotes after the</p><p><code>@</code>. The same rules apply as using single quoted here-strings.</p><p><code>$Red = 'red' $Green = 'green' $Blue = 'blue' $Body = @" { "apple": [ $Red, $Green ], "grape": [ $Green, $Red ], "blueberry": $Blue } "@</code>Now that we built our here-string, we can now invoke a Rest API and do something with it. This will help when a vendor supplies a JSON payload to be used in a Rest API, all that needs to be done is substitute your values in a here-string and invoke the Rest API. As always, practice makes perfect, try running examples in the console before running in a production environment. Here-strings will save you some lines of code and time when building your PowerShell scripts.</p><p>To learn about here-strings, visit Microsoft&rsquo;s documentation on quoting rules.<br><a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-6">https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-6</a></p><p>Chris Liquori - Twitter:<a href="https://twitter.com/pwshliquori">@pwshliquori</a></p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 5-April-2019</title><link>https://powershell.org/articles/2019-04-05-icymi-powershell-week-of-5-april-2019/</link><guid>https://powershell.org/articles/2019-04-05-icymi-powershell-week-of-5-april-2019/</guid><pubDate>Fri, 05 Apr 2019 15:00:51 +0000</pubDate><description>&lt;p&gt;Topics include remoting with SSH, sending SMS alerts, some live stream coding, and keybinds that you may not have known about.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include remoting with SSH, sending SMS alerts, some live stream coding, and keybinds that you may not have known about.</p><p>Content curated by Robin Dadswell and Mark Roloff</p><h6 id="master-user-creator-" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#master-user-creator-powershell-gui-software-v2-update"/><a href="https://www.thelazyadministrator.com/2019/04/01/master-user-creator-powershell-gui-software-v2-update/"><em>Master User Creator [PowerShell GUI Software] v2 Update</em></a><a class="ps-heading-anchor" href="#master-user-creator-" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brad Wyatt on April 1st</p><p>MUC, if you haven&rsquo;t seen it, is a powerful little tool that makes account creation in AD or O365 a real snap.</p><h6 id="the-powershell-gallery-is-now-more-accessible" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#the-powershell-gallery-is-now-more-accessible"/><a href="https://devblogs.microsoft.com/powershell/the-powershell-gallery-is-now-more-accessible/"><em>The PowerShell Gallery is now more Accessible</em></a><a class="ps-heading-anchor" href="#the-powershell-gallery-is-now-more-accessible" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Sydney Smith on April 1st</p><p>Screen readers rejoice! The Gallery has received some usability improvements to make everyone&rsquo;s experience a little nicer.</p><h6 id="sending-text-messages-from-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#sending-text-messages-from-powershell"/><a href="https://mtreit.net/notestoself/2019/03/30/sending-text-messages-from-powershell/"><em>Sending text messages from PowerShell</em></a><a class="ps-heading-anchor" href="#sending-text-messages-from-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mike Treit on March 30th</p><p>Maybe you get enough emails as it is, so text alerts from your scripts can be a gentler and lighter alternative.</p><h6 id="setup-powershell-ssh-remoting-in-powershell-6" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#setup-powershell-ssh-remoting-in-powershell-6"/><a href="https://www.thomasmaurer.ch/2019/04/setup-powershell-ssh-remoting-in-powershell-6/"><em>Setup Powershell SSH Remoting In Powershell 6</em></a><a class="ps-heading-anchor" href="#setup-powershell-ssh-remoting-in-powershell-6" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Thomas Maurer on April 4th</p><p>If you&rsquo;ve been curious about using SSH with PowerShell, Thomas has a great step-by-step guide to help you get going.</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#reddit-rpowershell---popular-weekly-post"/><a href="https://old.reddit.com/r/PowerShell/comments/b8y4mx/i_was_today_years_old/"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Awesome Reddit tips strikes again, as /u/RC-7201 discovers a keybind to clear your screen and more people chime in with their hidden keybind gems.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#tweet-of-the-week"/><a href="https://twitter.com/TylerLeonhardt/status/1113078631771799553"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>A Docker container loaded up with everything you need to get crackin&rsquo; with PowerShell development? Yes, please!</p><h6 id="twitch-powershell-adventures-w-nate--scrt-hq" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190405.md#twitch-powershell-adventures-w-nate--scrt-hq"/><a href="https://www.twitch.tv/videos/403373735"><em>Twitch: PowerShell Adventures w/ Nate @ SCRT HQ</em></a><a class="ps-heading-anchor" href="#twitch-powershell-adventures-w-nate--scrt-hq" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Hang out with Nate Ferrel while he works through some open issues with the PSGSuite module.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 29-March-2019</title><link>https://powershell.org/articles/2019-03-29-icymi-powershell-week-of-29-march-2019/</link><guid>https://powershell.org/articles/2019-03-29-icymi-powershell-week-of-29-march-2019/</guid><pubDate>Fri, 29 Mar 2019 15:00:17 +0000</pubDate><description>&lt;p&gt;Topics include an update to PSScriptAnalyzer, Pester, and customizing SharePoint menus.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include an update to PSScriptAnalyzer, Pester, and customizing SharePoint menus.</p><p>Content curated by Robin Dadswell and Mark Roloff.</p><h6 id="powershell-scriptanalyzer-version-1180-released" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#powershell-scriptanalyzer-version-1180-released"/><a href="https://devblogs.microsoft.com/powershell/powershell-scriptanalyzer-version-1-18-0-released/"><em>PowerShell ScriptAnalyzer Version 1.18.0 Released</em></a><a class="ps-heading-anchor" href="#powershell-scriptanalyzer-version-1180-released" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jim Truher on March 22nd</p><p>A new ScriptAnalyzer is out. Faster, better DSC support, and better handling of multi-line pipelines. Pick it up from the PSGallery!</p><h6 id="pee-object" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#pee-object"/><a href="https://www.dannymeister.com/2019/03/26/pee-object.html"><em>Pee-Object</em></a><a class="ps-heading-anchor" href="#pee-object" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Danny Meister on March 26th</p><p>Ever have a need to print some progress or the current object to the console in the middle of your pipeline? Well, now there&rsquo;s a function for that.</p><h6 id="programmatically-change-the-new-menu-in-sharepoint-online-using-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#programmatically-change-the-new-menu-in-sharepoint-online-using-powershell"/><a href="https://cann0nf0dder.wordpress.com/2019/03/24/programmatically-change-the-new-menu-in-sharepoint-online-using-powershell/"><em>Programmatically change the New Menu in SharePoint Online using PowerShell</em></a><a class="ps-heading-anchor" href="#programmatically-change-the-new-menu-in-sharepoint-online-using-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Paul Matthews on March 24th</p><p>Customizing document library menus in SharePoint gets a fun facelift with Paul&rsquo;s scripted method.</p><h6 id="f7-is-the-greatest-powershell-hotkey-that-no-one-uses-any-more-we-must-fix-this" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#f7-is-the-greatest-powershell-hotkey-that-no-one-uses-any-more-we-must-fix-this"/><a href="https://www.hanselman.com/blog/F7IsTheGreatestPowerShellHotkeyThatNoOneUsesAnyMoreWeMustFixThis.aspx"><em>F7 is the greatest PowerShell hotkey that no one uses any more. We must fix this</em></a><a class="ps-heading-anchor" href="#f7-is-the-greatest-powershell-hotkey-that-no-one-uses-any-more-we-must-fix-this" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Scott Hanselman on March 26th</p><p>Scott discusses the absence of this little gem of a feature and a small workaround for using it. There&rsquo;re some nice tips in the comments too.</p><h6 id="enforcing-code-style-using-pester" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#enforcing-code-style-using-pester"/><a href="https://chrislgardner.github.io/powershell/2019/03/26/enforcing-style-with-pester.html"><em>Enforcing Code Style using Pester</em></a><a class="ps-heading-anchor" href="#enforcing-code-style-using-pester" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Chris Gardner on March 26th</p><p>If validating code style is something you need, Chris has an interesting approach to it via unit tests.</p><h6 id="general-availability-of-powershell-core-62" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#general-availability-of-powershell-core-62"/><a href="https://devblogs.microsoft.com/powershell/general-availability-of-powershell-core-6-2/"><em>General Availability of PowerShell Core 6.2</em></a><a class="ps-heading-anchor" href="#general-availability-of-powershell-core-62" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Steve Lee on March 28th</p><p>Has it really been 6 months already? A large number of changes have been packed into this release, so check out the changelog for a little lite reading.</p><h6 id="youtube-pester-with-kevin-marquette---march-28-2019" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190329.md#youtube-pester-with-kevin-marquette---march-28-2019"/><a href="https://www.youtube.com/watch?v=x3ufUibf6eI"><em>Youtube: Pester with Kevin Marquette - March 28, 2019</em></a><a class="ps-heading-anchor" href="#youtube-pester-with-kevin-marquette---march-28-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From the Austin PSUG, Kevin leads a demonstration on using Pester to unit test your scripts.</p>]]></content:encoded></item><item><title>Secure Your Powershell Session with JEA and Constrained Endpoints</title><link>https://powershell.org/articles/2019-03-28-secure-your-powershell-session-with-jea-and-constrained-endpoints/</link><guid>https://powershell.org/articles/2019-03-28-secure-your-powershell-session-with-jea-and-constrained-endpoints/</guid><pubDate>Thu, 28 Mar 2019 20:57:51 +0000</pubDate><description>&lt;h2 id="index" class="ps-heading wp-block-heading"&gt;Index&lt;a class="ps-heading-anchor" href="#index" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="#what-is-a-constrained-endpoint-and-why-would-i-need-one"&gt;What is a Constrained Endpoint and Why Would I Need One?&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="#setup-and-configuration"&gt;Setup and Configuration&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="#using-our-endpoint"&gt;Using our Endpoint&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="what-is-a-constrained-endpoint-and-why-would-i-need-one" class="ps-heading wp-block-heading"&gt;What is a constrained endpoint and why would I need one?&lt;a class="ps-heading-anchor" href="#what-is-a-constrained-endpoint-and-why-would-i-need-one" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Powershell constrained endpoints are a means of interacting with powershell in a manner consistent with the &lt;a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege"&gt;principal of least privilege&lt;/a&gt;. In Powershell terms, this is referred to as Just-Enough-Administration, or JEA.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<h2 id="index" class="ps-heading wp-block-heading">Index<a class="ps-heading-anchor" href="#index" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><ul><li><p><a href="#what-is-a-constrained-endpoint-and-why-would-i-need-one">What is a Constrained Endpoint and Why Would I Need One?</a></p></li><li><p><a href="#setup-and-configuration">Setup and Configuration</a></p></li><li><p><a href="#using-our-endpoint">Using our Endpoint</a></p></li></ul><h2 id="what-is-a-constrained-endpoint-and-why-would-i-need-one" class="ps-heading wp-block-heading">What is a constrained endpoint and why would I need one?<a class="ps-heading-anchor" href="#what-is-a-constrained-endpoint-and-why-would-i-need-one" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Powershell constrained endpoints are a means of interacting with powershell in a manner consistent with the<a href="https://en.wikipedia.org/wiki/Principle_of_least_privilege">principal of least privilege</a>. In Powershell terms, this is referred to as Just-Enough-Administration, or JEA.</p><p>JEA is very well documented, so this won&rsquo;t simply be repeating everything those references detail. Instead, we&rsquo;ll go through a simple, real-world use-case of when and why you might need to deploy one.</p><p><strong>Scenario:</strong></p><p>A subset of your team needs permissions to do one single action outside the normal scope of their jobs - The ability to restart a service on a server. This particular application will not accept changes to it without a restart, so this access needs to be delegated to the team responsible for maintaining the application, rather than calling you ever 12-15 minutes throughout the day.</p><p>You might be thinking, why not just email them a link to a one-liner of code and say &ldquo;Hey, run this in the terminal thingy!&rdquo;</p><p><code>Invoke-Command -Server myserver -ScriptBlock {Get-Service myservice | Restart-Service}</code>First, now the<strong>entire team</strong> needs PS-Remoting rights, administrator rights on the remote server (!), and a contract with HR not to replace the contents of</p><p><code>-ScriptBlock { }</code>with something more sinister or destructive. Instead, we&rsquo;re going to let them do just enough administration to accomplish what they need to.</p><h2 id="setup-and-configuration" class="ps-heading wp-block-heading">Setup and Configuration<a class="ps-heading-anchor" href="#setup-and-configuration" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Now that we&rsquo;ve established why we need a constrained endpoint, let&rsquo;s use powershell to create one. For this example, we will have a custom module</p><p><code>mymodule.psm1</code>that exposes two functions:</p><ul><li/></ul><p><code>Get-Foo</code>- a custom function we wrote for demonstration purposes</p><ul><li/></ul><p><code>Restart-OurCustomService</code>- a function that explicitly calls</p><p><code>Restart-Service -Service OurCustomService</code>Here is our custom module,</p><p><code>mymodule.psm1</code>:</p><p><code>Function Get-Foo { param( [string] $Message = "Hello World!" ) Write-Output $Message Write-EventLog -LogName 'MyPSEndpoint' -Source 'Get-Foo' -EntryType Information -EventId 2000 -Message "Get-Foo -Message '$Message' was run." } Function Restart-OurCustomService { [cmdletbinding()] param() Try { Restart-Service -Name OurCustomService -Force -ErrorAction Stop -ErrorVariable err Write-Host -ForegroundColor green "OurCustomService was restarted!" Write-EventLog -LogName 'MyPSEndpoint' -Source 'Restart-OurCustomService' -EntryType Information -EventId 2001 -Message "Successfully restarted." } Catch { Write-Host -ForegroundColor red "OurCustomService could not be restarted." Write-EventLog -LogName 'MyPSEndpoint' -Source 'Restart-OurCustomService' -EntryType Error -EventId 2002 -Message "$err" } }</code>These are the only two commands we want our team members to be able to run.</p><p><strong>Logging</strong></p><p>It&rsquo;s always good idea to have some type of logging, so before we even create the actual PS-Session, we&rsquo;re going to create a Windows Event Log source for it:</p><p><code>$Sources = @( 'Get-Foo', 'Restart-OurCustomService' ) New-EventLog -LogName "MyPSEndpoint" -Source $Sources</code>Now, we&rsquo;ll be able to see what commands were run through the Event Log, as well as audit any errors thrown.</p><p><strong>Creating the module</strong></p><p>We&rsquo;ll need to make sure our module is available on the remote computer. There are several ways to do this, but for this demo, we&rsquo;ll simply create a folder for it in one of the standard module directories.</p><p>The file path will end up being:</p><p><code>C:\Windows\system32\WindowsPowerShell\v1.0\Modules\MyModule\mymodule.psm1</code>.</p><p><strong>Creating the session configuration file</strong></p><p>Next, we need to actually create the session endpoint. We need to ensure our users can only use the functions and cmdlets we&rsquo;ve specified, so in order to do that we need to configure a few parameters.</p><p>First, is</p><p><code>LanguageMode</code>, of which we&rsquo;ll be using the</p><p><code>Restricted</code>type. The help file for</p><p><code>New-PSSessionConfigurationFile</code>explain exactly what this entails:</p><blockquote/><blockquote><p>RestrictedLanguage: Users may run cmdlets and functions, but are not permitted to use script blocks or variables except for the following permitted variables: $PSCulture, $PSUICulture, $True, $False, and $Null. Users may use only the basic comparison operators (-eq, -gt, -lt). Assignment statements, property references, and method calls are not permitted.</p></blockquote><p>Similar to language mode, we also want to set a custom ExecutionPolicy for our endpoint. For this example, since we really only need our 3 defined commands, we&rsquo;ll use</p><p><code>RemoteSigned</code>. For more information on various execution policies, see Microsoft&rsquo;s</p><p><a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-5.1">about_Execution_Policies</a> documentation.</p><p>Last, we will configure a</p><p><code>SessionType</code>. Another brief look at</p><p><code>Get-Help New-PSSessionConfigurationFile</code>shows:</p><blockquote/><blockquote><p>RestrictedRemoteServer: Includes only the following proxy functions:</p><p><code>&gt; Exit-PSSession</code>&gt; ,</p><p><code>&gt; Get-Command</code>&gt; ,</p><p><code>&gt; Get-FormatData</code>&gt; ,</p><p><code>&gt; Get-Help</code>&gt; ,</p><p><code>&gt; Measure-Object</code>&gt; ,</p><p><code>&gt; Out-Default</code>&gt; , and</p><p><code>&gt; Select-Object</code>&gt; . Use the parameters of this cmdlet to add modules, functions, scripts, and other features to the session.</p></blockquote><p>Our code to create our session should now look like this:</p><p><code>$sessionparams = @{ 'Path' = "$env:windir\system32\WindowsPowerShell\v1.0\MyPSEndpoint.pssc" 'LanguageMode' = 'RestrictedLanguage' 'ExecutionPolicy' = 'RemoteSigned' 'SessionType' = 'RestrictedRemoteServer' 'ModulesToImport' = @('MyModule') } New-PSSessionConfigurationFile @sessionparams</code>The last thing necessary to begin using our constrained endpoint is to register it with Powershell:</p><p><code>$registerparams = @{ 'Name' = 'MyPSEndpoint' 'Path' = "$env:windir\system32\WindowsPowerShell\v1.0\MyPSEndpoint.pssc" 'ShowSecurityDescriptorUI' = $True } Register-PSSessionConfiguration @registerparams</code>A very important screen should now appear. This is the SecurityDescriptorUI, which will allow us to delegate permissions for who can access our endpoint.</p><blockquote/><blockquote><p>NOTE: You won&rsquo;t be able to set the SecurityDescriptorUI over a remote PSSession, so be sure to use the console to do this part. If you mess this up, you can reset it from a console:</p><p><code>&gt; Get-PSSessionConfiguration -Name MyPSEndpoint | SetPSSessionConfiguration -ShowSecurityDescriptorUI</code>&gt;</p></blockquote><p>Assign permissions as needed, and then verify your configuration has appropriate permissions:</p><p><code>PS C:\Users\nate&gt; Get-PSSessionConfiguration -Name MyPSEndpoint Name : MyPSEndpoint PSVersion : 5.1 StartupScript : RunAsUser : Permission : NT AUTHORITY\INTERACTIVE AccessAllowed, BUILTIN\Administrators AccessAllowed, BUILTIN\Remote Management Users AccessAllowed</code>Without any additional configuration, commands run through the endpoint will execute as the logged in user. For this example, we need to specify other credentials on the server to execute our commands so our users do not need admin rights themselves.</p><p><code>$RunAsCred = (Get-Credential) Set-PSSessionConfiguration -Name MyPSEndpoint -RunAsCredential $RunAsCred</code>## Using our endpoint {.wp-block-heading}</p><p>Now we&rsquo;re ready to connect and use our endpoint. As a user with permissions delegated via the Security Descriptor above, run the following:</p><p><code>New-PSSession -ComputerName 'remoteserver' -ConfigurationName 'MyPSEndpoint' | Enter-PSSession</code>If all goes well, we should be greeted with a remote session PS prompt, as denoted by the</p><p><code>[remoteserver] PS&gt;</code>in front of the console prompt.</p><p>Now we can start to explore what we can can&rsquo;t do! (As long as we configured our session correctly)</p><p>Familiar commands like &lsquo;Get-ChildItem&rsquo; won&rsquo;t work, and will result in an &lsquo;unknown cmdlet&rsquo; error. In fact there&rsquo;s literally nothing we can run except the commands in our module, and a few pre-defined commands necessary for the session to function. We can list our options with</p><p><code>Get-Command</code>[wincore2019demo]: PS&gt; Get-Command
CommandType Name Version Source</p><hr><p>Function Clear-Host
Function Exit-PSSession
Function Get-Command
Function Get-Foo 0.0 MyModule
Function Get-FormatData
Function Get-Help
Function Measure-Object
Function Out-Default
Function Restart-OurCustomService 0.0 MyModule
Function Select-Object
`Our two commands are present from our module, and that&rsquo;s essentially it. The other functions are pre-defined by the session type</p><p><code>RestrictedRemoteServer</code>, and are needed for the endpoint to function correctly.</p><p>We can run</p><p><code>Get-Foo</code>:</p><p><code>[wincore2019demo]: PS&gt;Get-Foo -Message "I love Powershell!" I love Powershell! PS&gt;</code>We can run</p><p><code>Restart-OurCustomService</code>:</p><p><code>PS&gt; Restart-OurCustomService OurCustomService could not be restarted. PS&gt;</code>We can see the results of our interactions in the event log. My demo VM has no service &ldquo;OurCustomService&rdquo; so it displayed a friendly error to the console, and logged the verbose error to the event log.</p><blockquote/><blockquote><p>TIP: In Restricted Language Mode, we do not have access to the global variable $error. However, by utilizing advanced functions, we can specify -ErrorVariable to still be able to write the error to the event log, even if we don&rsquo;t present this information to our users in the console. This can be seen in the Restart-OurCustomService function, and in the screenshot below.</p></blockquote><p><img src="https://i.imgur.com/Jk0Iwaq.png" alt="Imgur"/><p>At this point we&rsquo;ve gone over creating a Powershell JEA Endpoint using restricted language and an available custom module for restarting a service. There is a massive amount more you can do with this, but I hope this real-world demonstration has made JEA just a little bit less intimidating and easy to use!</p>
]]></content:encoded></item><item><title>2019 Community Lightning Demos</title><link>https://powershell.org/articles/2019-03-26-2019-community-lightning-demos/</link><guid>https://powershell.org/articles/2019-03-26-2019-community-lightning-demos/</guid><pubDate>Tue, 26 Mar 2019 12:59:17 +0000</pubDate><description>&lt;h3 id="rambling" class="ps-heading wp-block-heading"&gt;Rambling&lt;a class="ps-heading-anchor" href="#rambling" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m a huge fan of lightning demos. From the community and PowerShell Team lightning demos we get at &lt;a href="https://powershell.org/summit/"&gt;the summit&lt;/a&gt;, to &lt;a href="https://github.com/PSPowerHour/PSPowerHour"&gt;PSPowerHour&lt;/a&gt;, to various local groups and conferences using the format.&lt;/p&gt;
&lt;p&gt;At the 2019 PowerShell + DevOps Global Summit, we&amp;rsquo;ll have about 90 minutes for these demos - now we just need proposals from you!&lt;/p&gt;
&lt;p&gt;So! Why might you be interested in lightning demos?&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<h3 id="rambling" class="ps-heading wp-block-heading">Rambling<a class="ps-heading-anchor" href="#rambling" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>I&rsquo;m a huge fan of lightning demos. From the community and PowerShell Team lightning demos we get at<a href="https://powershell.org/summit/">the summit</a>, to<a href="https://github.com/PSPowerHour/PSPowerHour">PSPowerHour</a>, to various local groups and conferences using the format.</p><p>At the 2019 PowerShell + DevOps Global Summit, we&rsquo;ll have about 90 minutes for these demos - now we just need proposals from you!</p><p>So! Why might you be interested in lightning demos?</p><h3 id="why-lightning-demos" class="ps-heading wp-block-heading">Why Lightning Demos<a class="ps-heading-anchor" href="#why-lightning-demos" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Lightning demos are great for the audience and speakers alike.</p><p>For the audience:</p><ul><li><p>Fast paced (Less than 10 minutes each)</p></li><li><p>Many speakers</p></li><li><p>Topic or speaker not what you&rsquo;re looking for? They&rsquo;ll change in a few minutes</p></li><li><p>Demos offer enough material to give you ideas and point out where to learn more</p></li><li><p>Content is more likely to have a high signal-to-noise ratio given the time constraints</p></li></ul><p>For the speakers:</p><ul><li><p>No need to come up with a full length session and the content behind it</p></li><li><p>It can be comforting knowing you have a bunch of peers joining you</p></li><li><p>You can get enough info to the audience for them to get excited and want to learn more</p></li><li><p>You get a platform to share something awesome with the community</p></li></ul><p>Hopefully you&rsquo;re up for doing a demo! Let&rsquo;s go over how to get involved.</p><h3 id="proposing-a-lightning-demo" class="ps-heading wp-block-heading">Proposing a Lightning Demo<a class="ps-heading-anchor" href="#proposing-a-lightning-demo" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>There are a few optional fields, but all we really need is your e-mail, your name, a title, and a quick sentence or paragraph abstract on what you&rsquo;ll talk about.</p><p>All you need to do is sign up here:<a href="http://bit.ly/doademo19">bit.ly/doademo19</a></p><p>We&rsquo;ll be in touch, but to give you a quick idea of how things will go…</p><h3 id="ive-proposed-whats-next" class="ps-heading wp-block-heading">I&rsquo;ve Proposed! What&rsquo;s Next?<a class="ps-heading-anchor" href="#ive-proposed-whats-next" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><ul><li><p>The 10 minute limit is a hard limit. We&rsquo;ll have to cut short if you hit the mark. Hooking up AV equipment counts as your time</p></li><li><p>Don&rsquo;t aim for 10 minutes. Show what you want to show. Does it only take 5 minutes? Even better!</p></li><li><p>We have 90 minutes. We&rsquo;ll schedule something like 15+ sessions, but if everyone takes their 10 minutes, we may only see 9</p></li><li><p>We&rsquo;ll give you the order of operations. At you in slot 1-9? You&rsquo;re up! 10-12? There&rsquo;s a good chance we&rsquo;ll get to you. 13-18? You<em>might</em> make it if things are speedy, if someone drops out, or if we find extra time</p></li><li><p>Worst case? We don&rsquo;t get to see your demo at the summit, but Michael Lombardi and I pester you to submit your demo to<a href="https://github.com/PSPowerHour/PSPowerHour">PSPowerHour</a>, an online lightning demo thing we do</p></li><li><p>We&rsquo;ll do our best to get everyone on stage, but we&rsquo;ll likely follow last year&rsquo;s preferences:</p><pre><code>New speakers over breakout session speakers and previous demo speakersWe'll do our best to get everyone on stage, but we'll likely follow last year's preferences:</code></pre><ul><li><p>New ideas or interesting variations over well trodden topics</p></li><li><p>Community sessions over vendors, on similar topics (why? The happy path isn&rsquo;t always the most helpful!)</p></li></ul></li><li><p>Yes. I mentioned vendors. The PowerShell Team and Community lightning demos will be done together this year. (Attending) Vendors are welcome to submit demos, but we&rsquo;ll be leaning towards the community in many cases</p></li></ul><p>That&rsquo;s it! We&rsquo;ll take<a href="http://bit.ly/doademo19">proposals</a> up through April 15th, and will get back to you on April 17th. This gives you ~two weeks to propose, and ~two weeks to put together an awesome demo - I hope to see you all up there on the stage!</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 22-March-2019</title><link>https://powershell.org/articles/2019-03-22-icymi-powershell-week-of-22-march-2019/</link><guid>https://powershell.org/articles/2019-03-22-icymi-powershell-week-of-22-march-2019/</guid><pubDate>Fri, 22 Mar 2019 15:00:14 +0000</pubDate><description>&lt;p&gt;Topics include PowerShell IoT, Nmap in PS, and some livestreamed contributions to PSHTML.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PowerShell IoT, Nmap in PS, and some livestreamed contributions to PSHTML.</p><p>Special thanks to Robin Dadswell and Mark Roloff.</p><h6 id="list-and-change-bios-settings-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190322.md#list-and-change-bios-settings-with-powershell"/><a href="http://www.systanddeploy.com/2019/03/list-and-change-bios-settings-with.html"><em>List and change BIOS settings with PowerShell</em></a><a class="ps-heading-anchor" href="#list-and-change-bios-settings-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Damien Van Robaeys on March 19th</p><p>Methods covered are specific to 3 of the major hardware manufacturers, which makes this especially handy.</p><h6 id="poshnmap" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190322.md#poshnmap"/><a href="https://github.com/justingrote/poshnmap"><em>PoshNmap</em></a><a class="ps-heading-anchor" href="#poshnmap" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Justin Grote</p><p>Not a blog but this was announced a few days ago and seemed worth sharing. PoshNmap is a wrapper for the ubiquitous Nmap tool.</p><h6 id="getting-started-with-powershell-core-on-raspian-raspberry-pi--light-up-a-led" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190322.md#getting-started-with-powershell-core-on-raspian-raspberry-pi--light-up-a-led"/><a href="https://danielsknowledgebase.wordpress.com/2019/03/20/getting-started-with-powershell-core-on-raspbian-raspberry-pi-light-up-a-led/"><em>Getting Started With PowerShell (Core) on Raspian (Raspberry Pi) – Light Up a LED</em></a><a class="ps-heading-anchor" href="#getting-started-with-powershell-core-on-raspian-raspberry-pi--light-up-a-led" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Daniel Silva on March 20th</p><p>I mean&hellip; The title really says it all. If you&rsquo;re curious about IoT, this is a great little practical exercise to get you introduced to it.</p><h6 id="powershell-crash-course" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190322.md#powershell-crash-course"/><a href="https://dev.to/jeikabu/powershell-crash-course-3go5"><em>PowerShell Crash Course</em></a><a class="ps-heading-anchor" href="#powershell-crash-course" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by jeikabu on March 15th</p><p>A different kind of crash course. It&rsquo;s really more of a quick primer to PowerShell Core for *nix admins/developers.</p><h6 id="sql-database-backups-using-powershell-module--dbatools" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190322.md#sql-database-backups-using-powershell-module--dbatools"/><a href="https://www.sqlshack.com/sql-database-backups-using-powershell-module-dbatools/"><em>SQL Database Backups using PowerShell Module – DBATools</em></a><a class="ps-heading-anchor" href="#sql-database-backups-using-powershell-module--dbatools" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Rajendra Gupta on March 21st</p><p>There&rsquo;s apparently plenty of different configurations for backing up databases with the DBATools module, and Rajendra demonstrates a good number of them here.</p><h6 id="youtube-closing-an-issue-in-pshtml-to-improve-charting-in-html-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190322.md#youtube-closing-an-issue-in-pshtml-to-improve-charting-in-html-with-powershell"/><a href="https://www.youtube.com/watch?v=X5Yv5CdQYK8"><em>Youtube: Closing an issue in PSHTML to improve charting in HTML with PowerShell</em></a><a class="ps-heading-anchor" href="#youtube-closing-an-issue-in-pshtml-to-improve-charting-in-html-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Anthony livestreams his journey into writing an improvement to a public module.</p>]]></content:encoded></item><item><title>Running Universal Dashboard with Ubuntu and Nginx (With HTTPS!)</title><link>https://powershell.org/articles/2019-03-22-running-universal-dashboard-with-ubuntu-and-nginx-with-https/</link><guid>https://powershell.org/articles/2019-03-22-running-universal-dashboard-with-ubuntu-and-nginx-with-https/</guid><pubDate>Fri, 22 Mar 2019 14:37:28 +0000</pubDate><description>&lt;p&gt;&lt;img src="https://i.imgur.com/Rqj22dX.png" alt="Imgur"&gt;&lt;em&gt;A basic UniversalDashboard running on nginx&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="index" class="ps-heading wp-block-heading"&gt;Index&lt;a class="ps-heading-anchor" href="#index" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="#prerequisites"&gt;Prerequisites&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="#configuration"&gt;Configuration&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="#configuring-https"&gt;HTTPS (Optional)&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="prerequisites" class="ps-heading wp-block-heading"&gt;Prerequisites&lt;a class="ps-heading-anchor" href="#prerequisites" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;For this writeup, I&amp;rsquo;m using Ubuntu 18.04. Software packages are geared toward using that version.&lt;/p&gt;
&lt;p&gt;First, we&amp;rsquo;ll need to install our dependencies&lt;/p&gt;
&lt;p&gt;There are several ways to install Powershell core on Ubuntu. I recommend &lt;a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1804"&gt;Microsoft&amp;rsquo;s documentation for ubuntu 18.04 here&lt;/a&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p><img src="https://i.imgur.com/Rqj22dX.png" alt="Imgur"><em>A basic UniversalDashboard running on nginx</em></p><h2 id="index" class="ps-heading wp-block-heading">Index<a class="ps-heading-anchor" href="#index" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><ul><li><p><a href="#prerequisites">Prerequisites</a></p></li><li><p><a href="#configuration">Configuration</a></p></li><li><p><a href="#configuring-https">HTTPS (Optional)</a></p></li></ul><h2 id="prerequisites" class="ps-heading wp-block-heading">Prerequisites<a class="ps-heading-anchor" href="#prerequisites" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>For this writeup, I&rsquo;m using Ubuntu 18.04. Software packages are geared toward using that version.</p><p>First, we&rsquo;ll need to install our dependencies</p><p>There are several ways to install Powershell core on Ubuntu. I recommend<a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6#ubuntu-1804">Microsoft&rsquo;s documentation for ubuntu 18.04 here</a></p><p>Once installed, enter Powershell and install the<a href="https://www.poshud.com">UniversalDashboard</a> module. This will use the community edition.</p><p><code>pwsh PS&gt; Install-Module UniversalDashboard.Community -Scope CurrentUser</code>Confirm it is installed:</p><p><code>PS&gt; Get-Module -ListAvailable</code>Next, we need to install our webserver:</p><p><code>sudo apt install nginx</code>## Configuration {.wp-block-heading}</p><p>First we need to have a dashboard to run, along with a place to run it.</p><p>Create a project directory. This example uses</p><p><code>my-site</code>at the root of my user profile.</p><p><code>cd ~ mkdir my-site cd ./my-site</code>Place the following into a file called</p><p><code>dashboard.ps1</code>and place it at the root of your project:</p><p><code>$MyDashboard = New-UDDashboard -Title "Nginx Dashboard" -Content { New-UDCard -Title "Running UD with Nginx!" } Start-UDDashboard -Port 8080 -Dashboard $MyDashboard -Name 'Nginx Dashboard' -Wait</code>&gt;</p><blockquote><p>NOTE: You may have a dashboard which includes many folders, depending on the structure of your project. In that case, copy the entire folder structure into your project folder</p><p><code>&gt; (my-site)</code>&gt; . Make sure</p><p><code>&gt; dashboard.ps1</code>&gt; is at the root of this folder.</p></blockquote><p>Now, we need to configure our webserver to act as a reverse-proxy. This is done to make our site available via SSL in a very simple manner.</p><p>Let&rsquo;s create a very basic reverse-proxy configuration within nginx. Navigate to</p><p><code>/etc/nginx/sites-available</code>and remove the</p><p><code>default</code>file. This file is symlinked to</p><p><code>/etc/nginx/sites-enabled/default</code>, so remove it as well.</p><p>Next, head back to</p><p><code>/etc/nginx/sites-available</code>and create a file called</p><p><code>dashboard.conf</code>sudo nano dashboard.conf
`Place the following in it:</p><p><code>server { listen 80; server_name mydashboard; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }</code>Now we need to symlink our proxy&rsquo;s config file to the sites-enabled folder:</p><p><code>sudo ln -s /etc/nginx/sites-available/dashboard.conf /etc/nginx/sites-enabled/dashboard.conf</code>Next, we need it to run as a service so we can control our dashboard with</p><p><code>systemctl</code>. I&rsquo;m using Ubuntu, so I&rsquo;m going to use systemd to manage my service.</p><p>Navigate to</p><p><code>/etc/systemd/system</code>and create a service file for our service:</p><p><code>sudo nano uddashboard.service</code>Place the following in the service file. Note the path in</p><p><code>ExecStart</code>. This will need to match the path of your project&rsquo;s</p><p><code>dashboard.ps1</code>file. Also ensure the user specified to run the service has permissions to access your project folder.</p><p><code>[Unit] Description=Universal Dashboard Service After=syslog.target network.target [Service] User=nate Group=nate Type=simple StandardOutput=syslog StandardError=syslog ExecStart=/usr/bin/pwsh -c "&amp; /home/nate/my-site/dashboard.ps1" TimeoutStopSec=20 Restart=on-failure [Install] WantedBy=multi-user.target</code>Now, start your dashboard:</p><p><code>sudo systemctl start uddashboard.service</code>Your site should now be available at http ://localhost:80</p><p>Finally, we want to enable our service so that it starts at boot and will attempt error correction if stopped unceremoniously.</p><p><code>sudo systemctl enable uddashboard.service</code>You should now have a fully functioning dashboard.</p><p>If you&rsquo;d like to configure SSL, read on!</p><h2 id="configuring-https" class="ps-heading wp-block-heading">Configuring HTTPS<a class="ps-heading-anchor" href="#configuring-https" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>For this tutorial, I&rsquo;m using Let&rsquo;s Encrypt certificates. For more information on how to obtain LE certs, check out the Let&rsquo;s Encrypt documentation on<a href="https://letsencrypt.org/getting-started/">getting started</a>.</p><p>Make a directory for your certificates. Exactly where is up to you.</p><p><code>sudo mkdir /etc/nginx/certs cd /etc/nginx/certs</code>Since I&rsquo;m using Let&rsquo;s Encrypt, I have 2 certificate files I need to put here -</p><p><code>fullchain.pem</code>and</p><p><code>privkey.pem</code>.</p><p>Be sure to set permissions on both to 400 (user read-only)</p><p><code>sudo chmod 400 ./fullchain.pem sudo chmod 400 ./privkey.pem</code>Next, we need to modify our nginx config file to listen on HTTPS.</p><p><code>sudo nano /etc/nginx/sites-available/dashboard.conf</code>Now, we will listen on port 443, and port 80, which will perform a redirect to the secure version of our site:</p><blockquote/><blockquote><p>NOTE: Change</p><p><code>&gt; server_name</code>&gt; to your own servername</p></blockquote><p><code>server { listen 80; return 301 https://$host$request_uri; } server { listen 443 ssl; ssl on; server_name uddashboard.lab.natelab.us; ssl_protocols TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_certificate /etc/nginx/certs/fullchain.pem; ssl_certificate_key /etc/nginx/certs/privkey.pem; location / { proxy_pass http://localhost:8080; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }</code>Now, simply reload nginx</p><p><code>sudo service nginx reload</code>You should now have a secure Universal Dashboard server, running as a service. Huzzah!</p><blockquote/><blockquote><p>*NOTE: *This is a cross-post from my original blog post:<a href="https://blog.natelab.us/running-universal-dashboard-with-ubuntu-and-nginx-with-https">https://blog.natelab.us/running-universal-dashboard-with-ubuntu-and-nginx-with-https</a></p></blockquote>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 15-March-2019</title><link>https://powershell.org/articles/2019-03-15-icymi-powershell-week-of-15-march-2019/</link><guid>https://powershell.org/articles/2019-03-15-icymi-powershell-week-of-15-march-2019/</guid><pubDate>Fri, 15 Mar 2019 15:00:24 +0000</pubDate><description>&lt;p&gt;Topics include goodies for your prompt, more xplatform support for the SqlServer module, and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include goodies for your prompt, more xplatform support for the SqlServer module, and more.</p><p>Content pulled together by Robin Dadswell and Mark Roloff</p><h6 id="invoke-sqlcmd-is-now-available-supporting-cross-platform" class="ps-heading wp-block-heading"><a href="https://devblogs.microsoft.com/powershell/invoke-sqlcmd-is-now-available-supporting-cross-platform/"><em>Invoke-Sqlcmd is Now Available Supporting Cross-Platform</em></a><a class="ps-heading-anchor" href="#invoke-sqlcmd-is-now-available-supporting-cross-platform" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Steve Lee on March 11th</p><p>DBAs rejoice!</p><p><code>Invoke-SqlCmd</code>is now xplat with the latest PS Core build. Make sure you check out Steve&rsquo;s post for the details.</p><h6 id="powershell-core--updating-your-sql-server-linux-docker-containers-images" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190315.md#powershell-core--updating-your-sql-server-linux-docker-containers-images"/><a href="http://www.maxtblog.com/2019/03/powershell-core-updating-your-sql-server-linux-containers-images/"><em>PowerShell Core – Updating Your SQL Server Linux Docker Containers Images</em></a><a class="ps-heading-anchor" href="#powershell-core--updating-your-sql-server-linux-docker-containers-images" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Max Trinidad on March 10th</p><p>Speaking of xplat support for that cmdlet&hellip; Max demonstrates how to update your Linux Docker image to include the necessary tools for using</p><p><code>Invoke-SqlCmd</code>.</p><h6 id="programmatically-triggering-a-group-licenses-refresh-for-azuread" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190315.md#programmatically-triggering-a-group-licenses-refresh-for-azuread"/><a href="https://www.lieben.nu/liebensraum/2019/03/programmatically-triggering-a-group-licenses-refresh-for-azuread/"><em>Programmatically Triggering a Group Licenses Refresh for AzureAD</em></a><a class="ps-heading-anchor" href="#programmatically-triggering-a-group-licenses-refresh-for-azuread" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jos Lieben on March 11th</p><p>As nice and the Az module and Graph API are, some things still aren&rsquo;t accessible through those. Jos shows us how to automate with Azure&rsquo;s &ldquo;hidden&rdquo; API.</p><h6 id="bitlocker-active-directory-recovery-password-backup-compliance" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190315.md#bitlocker-active-directory-recovery-password-backup-compliance"/><a href="https://mickitblog.blogspot.com/2019/03/bitlocker-active-directory-recover.html"><em>Bitlocker Active Directory Recovery Password Backup Compliance</em></a><a class="ps-heading-anchor" href="#bitlocker-active-directory-recovery-password-backup-compliance" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mick Pletcher on March 8th</p><p>For SCCM admins, here&rsquo;s a handy way to use PS with a Compliance Policy to make sure your BitLocker keys are properly backed up.</p><h6 id="the-happy-powershell-prompt" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190315.md#the-happy-powershell-prompt"/><a href="https://dev.to/azure/the-happy-powershell-prompt-2l4f"><em>The Happy PowerShell Prompt</em></a><a class="ps-heading-anchor" href="#the-happy-powershell-prompt" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Aaron Powell on March 12th</p><p>Who couldn&rsquo;t use a little more positivity in their shell? Using ConEmu, Aaron shows how to inject a little happiness into your prompt.</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190315.md#reddit-rpowershell---popular-weekly-post"/><a href="https://old.reddit.com/r/PowerShell/comments/b06gtw/til_that_powershell_can_do_colors/?st=jt9jgsxi&amp;sh=20e55b07"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>May be old news to some but /u/NotNotWrongUsually came across how colorful we can get in the shell now. Time to add a little extra pizazz to my prompt!</p><h6 id="youtube-anzpsug-march-2019" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190315.md#youtube-anzpsug-march-2019"/><a href="https://www.youtube.com/watch?v=1wLJ0yUDoMM"><em>Youtube: ANZPSUG March 2019</em></a><a class="ps-heading-anchor" href="#youtube-anzpsug-march-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Friedrich Weinmann joins the Australia and New Zealand PSUG to discuss PSFramework.</p>]]></content:encoded></item><item><title>Who's Your 2019 PowerShell Community Hero?</title><link>https://powershell.org/articles/2019-03-11-whos-your-2019-powershell-community-hero/</link><guid>https://powershell.org/articles/2019-03-11-whos-your-2019-powershell-community-hero/</guid><pubDate>Mon, 11 Mar 2019 15:18:59 +0000</pubDate><description>&lt;p&gt;Today we&amp;rsquo;re opening nominations for the 2019 PowerShell Community Heroes! We want to know about those in the community that are doing a wealth of good. Have they written a fantastic script, or posted a blog series that has been exceptionally helpful? Are they doing a mad amount of pull requests in a module or in PowerShell Core? Here is your opportunity to make sure they get the recognition they deserve!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Today we&rsquo;re opening nominations for the 2019 PowerShell Community Heroes! We want to know about those in the community that are doing a wealth of good. Have they written a fantastic script, or posted a blog series that has been exceptionally helpful? Are they doing a mad amount of pull requests in a module or in PowerShell Core? Here is your opportunity to make sure they get the recognition they deserve!</p><p>All you need to do is take a couple of minutes to fill out a quick survey to let us know who you&rsquo;d like to nominate and why. It&rsquo;s that simple!</p><p>Link:<a href="https://survey.sogosurvey.com/r/FsZhCb"><br>
https://survey.sogosurvey.com/r/FsZhCb</a></p><p>We&rsquo;ll be announcing the top honorees at this year&rsquo;s PowerShell + DevOps Global Summit, followed by an announcement right here on PowerShell.org. The survey closes on April 5th!</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 8-March-2019</title><link>https://powershell.org/articles/2019-03-08-icymi-powershell-week-of-8-march-2019/</link><guid>https://powershell.org/articles/2019-03-08-icymi-powershell-week-of-8-march-2019/</guid><pubDate>Fri, 08 Mar 2019 16:00:36 +0000</pubDate><description>&lt;p&gt;Topics include the Graph API, status pages, test-driven development, getting your Google 2FA in the shell, and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include the Graph API, status pages, test-driven development, getting your Google 2FA in the shell, and more.</p><p>Content curated by Robin Dadswell and Mark Roloff.</p><h6 id="powershell-and-the-microsoft-graph-api--part-2--starting-to-explore" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#powershell-and-the-microsoft-graph-api--part-2--starting-to-explore"/><a href="https://jamesone111.wordpress.com/2019/03/03/powershell-and-the-microsoft-graph-api-part-2-starting-to-explore/"><em>PowerShell and the Microsoft Graph API : Part 2 – Starting to explore</em></a><a class="ps-heading-anchor" href="#powershell-and-the-microsoft-graph-api--part-2--starting-to-explore" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by James O&rsquo;Neill on March 3rd</p><p>The Graph API is a vast and powerful tool in MS&rsquo;s cloud. With a little help from James, we can start to poke around at what it brings to the table. Make sure oyu check out pt 1 to see how the connection is built.</p><h6 id="connect-to-microsoft-graph-for-intune-with-powershell-ise-add-ons" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#connect-to-microsoft-graph-for-intune-with-powershell-ise-add-ons"/><a href="https://www.imab.dk/connect-to-microsoft-graph-for-intune-with-powershell-ise-add-ons-with-a-single-click/"><em>Connect to Microsoft Graph for Intune with Powershell ISE Add-ons</em></a><a class="ps-heading-anchor" href="#connect-to-microsoft-graph-for-intune-with-powershell-ise-add-ons" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Martin Bengtsson on March 4th</p><p>Keeping with the Graph theme, Martin has a great tool for you Intune admins that are still using ISE.</p><h6 id="meet-statusimo--powershell-generated-status-page" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#meet-statusimo--powershell-generated-status-page"/><a href="https://evotec.xyz/meet-statusimo-powershell-generated-status-page/"><em>Meet Statusimo – PowerShell generated Status Page</em></a><a class="ps-heading-anchor" href="#meet-statusimo--powershell-generated-status-page" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Przemyslaw Klys on March 6th</p><p>Building on his PSWriteHTML module, Przemysław now unveils Statusimo, an impressive new module that can help you create professional looking status pages for your organization.</p><h6 id="google-authenticator-in-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#google-authenticator-in-powershell"/><a href="https://humanequivalentunit.github.io/Google-Authenticator-In-PowerShell/"><em>Google Authenticator in PowerShell</em></a><a class="ps-heading-anchor" href="#google-authenticator-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by HumanEquivalentUnit on March 7th</p><p>This is pretty cool! Don&rsquo;t want to take out your phone to handle your 2FA login with Google? Get it in the shell!</p><h6 id="powershell-line-counting" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#powershell-line-counting"/><a href="https://gist.github.com/Jaykul/e1056d5182d0c5566a22f72387abf741"><em>PowerShell Line Counting</em></a><a class="ps-heading-anchor" href="#powershell-line-counting" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Joel Bennett on March 6th</p><p>Asking how many lines are in a script is easy enough to answer but what about from PowerShell&rsquo;s perspective? Joel uses the AST to find out how the PowerShell parser handles this.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#tweet-of-the-week"/><a href="https://twitter.com/TylerLeonhardt/status/1102749805233737729"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Not all heroes wear capes but umm&hellip; Somebody needs to buy Taylor Leonhardt a cape. With this little adjustment to VSCode, double-clicking a variable will now include the $ sign.</p><h6 id="youtube-how-to-do-test-driven-developmentdesign-in-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190308.md#youtube-how-to-do-test-driven-developmentdesign-in-powershell"/><a href="https://www.youtube.com/watch?v=k8rJ8HrN3Ro"><em>Youtube: How to do Test Driven Development/Design in PowerShell</em></a><a class="ps-heading-anchor" href="#youtube-how-to-do-test-driven-developmentdesign-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Doug Finke gives a quick demo on how he approaches test-driven development.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 1-March-2019</title><link>https://powershell.org/articles/2019-03-01-icymi-powershell-week-of-1-march-2019/</link><guid>https://powershell.org/articles/2019-03-01-icymi-powershell-week-of-1-march-2019/</guid><pubDate>Fri, 01 Mar 2019 16:00:11 +0000</pubDate><description>&lt;p&gt;Topics include more Iron Scripter, a trove of AD and O365 scripts, tons of REST API goodness, and some fundamental lessons from Brisbane.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include more Iron Scripter, a trove of AD and O365 scripts, tons of REST API goodness, and some fundamental lessons from Brisbane.</p><p>Special thanks to Brett Bunker, Robin Dadswell, and Mark Roloff.</p><h6 id="generating-powershell-cmdlets-from-openapiswagger-with-autorest" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190301.md#generating-powershell-cmdlets-from-openapiswagger-with-autorest"/><a href="https://devblogs.microsoft.com/powershell/cmdlets-via-autorest/"><em>Generating PowerShell Cmdlets from OpenAPI/Swagger with AutoRest</em></a><a class="ps-heading-anchor" href="#generating-powershell-cmdlets-from-openapiswagger-with-autorest" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Garrett Serack on February 22nd</p><p>AutoRest has added support for PowerShell! And I honestly had no idea what it was before this but it looks like a pretty cool way to generate code for hitting REST APIs from yaml files. Definitely worth looking at more closely!</p><h6 id="iron-scripter-2019-prelude-challenge-2" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190301.md#iron-scripter-2019-prelude-challenge-2"/><a href="https://ironscripter.us/iron-scripter-2019-prelude-challenge-2/"><em>Iron Scripter 2019 Prelude Challenge #2</em></a><a class="ps-heading-anchor" href="#iron-scripter-2019-prelude-challenge-2" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jeff Hicks on February 26th</p><p>If you&rsquo;ve been doing the Iron Scripter challenges, or would like to, don&rsquo;t forget to share your solutions! Everyone has a different take, so there&rsquo;s probably something new that you can teach somebody just by putting it out there.</p><h6 id="understanding-the-invoke-restmethod-powershell-cmdlet" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190301.md#understanding-the-invoke-restmethod-powershell-cmdlet"/><a href="https://4sysops.com/archives/understanding-the-invoke-restmethod-powershell-cmdlet/"><em>Understanding the Invoke-RestMethod PowerShell cmdlet</em></a><a class="ps-heading-anchor" href="#understanding-the-invoke-restmethod-powershell-cmdlet" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Adam Bertram on February 23rd</p><p>REST APIs are fun, and</p><p><code>Invoke-RestMethod</code>is your gateway to using them. Let Adam take you on a tour of this flexible cmdlet!</p><h6 id="get-latest-office-365-service-status-with-flow-or-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190301.md#get-latest-office-365-service-status-with-flow-or-powershell"/><a href="https://www.lee-ford.co.uk/get-latest-office-365-service-status-with-flow-or-powershell/"><em>Get Latest Office 365 Service Status with Flow or PowerShell</em></a><a class="ps-heading-anchor" href="#get-latest-office-365-service-status-with-flow-or-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Lee Ford on February 25th</p><p>Lee&rsquo;s guide will walk you through setting up an Azure AD app that can then be used by PowerShell to query your tenant&rsquo;s status. Bonus points for integrating it with your PoshBot deployment!</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190301.md#reddit-rpowershell---popular-weekly-post"/><a href="https://old.reddit.com/r/PowerShell/comments/atop5h/sharing_office_365active_directory_scripts"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Avast! Yonder Reddit post be havin&rsquo; a bounty o&rsquo; O365 and AD scripts fer the plunder! Arrrr!</p><h6 id="youtube-powershell-101-with-michael-and-christian" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190301.md#youtube-powershell-101-with-michael-and-christian"/><a href="https://www.youtube.com/watch?v=MeHS-w74BBg"><em>Youtube: PowerShell 101 with Michael and Christian</em></a><a class="ps-heading-anchor" href="#youtube-powershell-101-with-michael-and-christian" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From the Brisbane User Group, Michael gives a lesson on PS fundamentals covering flow control and decision making statements</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 22-February-2019</title><link>https://powershell.org/articles/2019-02-22-icymi-powershell-week-of-22-february-2019/</link><guid>https://powershell.org/articles/2019-02-22-icymi-powershell-week-of-22-february-2019/</guid><pubDate>Fri, 22 Feb 2019 16:00:51 +0000</pubDate><description>&lt;p&gt;Topics include PoshBot, JeaDsc, Azure Pipelines, Arrays and Hashtables, and Pester testing.&lt;/p&gt;
&lt;p&gt;Content curated by Brett Bunker, Robin Dadswell, and Mark Roloff.&lt;/p&gt;
&lt;h3 id="writing-a-poshbot-plugin-to-display-topdesk-tickets-and-assets" class="ps-heading wp-block-heading"&gt;&lt;a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#writing-a-poshbot-plugin-to-display-topdesk-tickets-and-assets"&gt;&lt;/a&gt;&lt;a href="https://andrewpla.github.io/Writing-a-PoshBot-Plugin/"&gt;&lt;em&gt;Writing a PoshBot Plugin to Display TOPdesk Tickets and Assets&lt;/em&gt;&lt;/a&gt;&lt;a class="ps-heading-anchor" href="#writing-a-poshbot-plugin-to-display-topdesk-tickets-and-assets" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;by Andrew Pla on February 16th&lt;/p&gt;
&lt;p&gt;Creating bots for Teams or Slack can make you more productive and save time by not having to swtich between applications. Come let Andrew show you how to create a bot for Teams using PoshBot.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include PoshBot, JeaDsc, Azure Pipelines, Arrays and Hashtables, and Pester testing.</p><p>Content curated by Brett Bunker, Robin Dadswell, and Mark Roloff.</p><h3 id="writing-a-poshbot-plugin-to-display-topdesk-tickets-and-assets" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#writing-a-poshbot-plugin-to-display-topdesk-tickets-and-assets"/><a href="https://andrewpla.github.io/Writing-a-PoshBot-Plugin/"><em>Writing a PoshBot Plugin to Display TOPdesk Tickets and Assets</em></a><a class="ps-heading-anchor" href="#writing-a-poshbot-plugin-to-display-topdesk-tickets-and-assets" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Andrew Pla on February 16th</p><p>Creating bots for Teams or Slack can make you more productive and save time by not having to swtich between applications. Come let Andrew show you how to create a bot for Teams using PoshBot.</p><h3 id="heading" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#scriptblock-and-convertto-json-a-match-made-in-recursive-hell"/><a href="https://chrislgardner.github.io/powershell/2019/02/17/convertto-json-scripblock.html"><em>[Scriptblock] and ConvertTo-Json: a match made in recursive hell</em></a><a class="ps-heading-anchor" href="#heading" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Chris Gardner on February 17th</p><p>Interested in deploying JEA in your environment? JeaDsc can help you deploy JEA endpoints across your enterprise, but there may be a gothcha with JSON. Let Chris show you how he resolved this issue.</p><h3 id="how-i-failed-my-way-to-success-with-azure-pipelines---part-2-release" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#how-i-failed-my-way-to-success-with-azure-pipelines---part-2-release"/><a href="https://king.geek.nz/2019/02/17/how-i-failed-my-way-to-success-with-azure-pipelines-part-2-release/"><em>How I Failed My Way to Success with Azure Pipelines - Part 2: Release</em></a><a class="ps-heading-anchor" href="#how-i-failed-my-way-to-success-with-azure-pipelines---part-2-release" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Josh King on February 17th</p><p>Josh walks you through setting up and configuring an Azure pipeline to use with PowerShell in this blog post. Testing in production is optional.</p><h3 id="powershell--few-tricks-about-hashtables-and-arrays-i-wish-i-knew-when-i-started" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#powershell--few-tricks-about-hashtables-and-arrays-i-wish-i-knew-when-i-started"/><a href="https://evotec.xyz/powershell-few-tricks-about-hashtable-and-array-i-wish-i-knew-when-i-started/amp/?__twitter_impression=true"><em>PowerShell – Few tricks about HashTables and Arrays I wish I knew when I started</em></a><a class="ps-heading-anchor" href="#powershell--few-tricks-about-hashtables-and-arrays-i-wish-i-knew-when-i-started" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Przemyslaw Klys on February 19th</p><p>Dive into some great examples on how to make you HashTables and Arrays look better and perform faster. Follow along with this post filled with great examples to improve your code.</p><h3 id="pester-testing-self-contained-scripts" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#pester-testing-self-contained-scripts"/><a href="https://nocolumnname.blog/2019/02/20/pester-testing-self-contained-scripts/amp/?__twitter_impression=true"><em>Pester Testing Self Contained Scripts</em></a><a class="ps-heading-anchor" href="#pester-testing-self-contained-scripts" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Shane O&rsquo;Neill on February 20th</p><p>Pestering your code is a good thing. Shane shows how to get started testing with Pester, with a tip for a great video to watch for even more Pester goodness.</p><h3 id="reddit-rpowershell---most-popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#reddit-rpowershell---most-popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/asabxe/"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Query Powershell Data Types?</p><h3 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#tweet-of-the-week"/><a href="https://twitter.com/alistek/status/1097961047825309702"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Powershell Core v6.1.3 was just released.</p><h3 id="youtube-an-introduction-to-just-enough-administration-with-james-petty" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190222.md#youtube-an-introduction-to-just-enough-administration-with-james-petty"/><a href="https://youtu.be/gyfYu-EbfEU"><em>Youtube: An Introduction to Just Enough Administration with James Petty</em></a><a class="ps-heading-anchor" href="#youtube-an-introduction-to-just-enough-administration-with-james-petty" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Research Triangle PowerShell Users Group Meetup</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 15-February-2019</title><link>https://powershell.org/articles/2019-02-15-icymi-powershell-week-of-15-february-2019/</link><guid>https://powershell.org/articles/2019-02-15-icymi-powershell-week-of-15-february-2019/</guid><pubDate>Fri, 15 Feb 2019 16:00:54 +0000</pubDate><description>&lt;p&gt;Topics include Iron Scripter, monitoring your filesystem, VSCode goodness, and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Iron Scripter, monitoring your filesystem, VSCode goodness, and more.</p><p>Content curated by Brett Bunker, Robin Dadswell, and Mark Roloff.</p><h6 id="iron-scripter-2019-begins" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190215.md#iron-scripter-2019-begins"/><a href="https://powershell.org/2019/02/iron-scripter-2019-begins/"><em>IRON SCRIPTER 2019 BEGINS!</em></a><a class="ps-heading-anchor" href="#iron-scripter-2019-begins" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Don Jones on February 13th</p><p>In case you missed it, here it is. The Iron Scripter challenges have officially kicked off with the first warm-up challenge having been posted. Solve challenges, join a faction, and show off your scripting-chops!</p><h6 id="monitor-file-changes-in-windows-with-powershell-and-pswatch" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190215.md#monitor-file-changes-in-windows-with-powershell-and-pswatch"/><a href="https://4sysops.com/archives/monitor-file-changes-in-windows-with-powershell-and-pswatch/"><em>Monitor file changes in Windows with PowerShell and pswatch</em></a><a class="ps-heading-anchor" href="#monitor-file-changes-in-windows-with-powershell-and-pswatch" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Dan Franciscus on February 11th</p><p>Dan gives a quick look into how easy it is to catch filesystem changes in real time with the PSWatch module.</p><h6 id="group-email-notification-for-dataset-refresh-failure" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190215.md#group-email-notification-for-dataset-refresh-failure"/><a href="https://insightsquest.com/2019/02/13/group-email-notification-for-dataset-refresh-failure/"><em>Group Email Notification For Dataset Refresh Failure</em></a><a class="ps-heading-anchor" href="#group-email-notification-for-dataset-refresh-failure" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brett Powell on February 13th</p><p>Here&rsquo;s a nice example of how PS can fit into a chain of other tools to create a novel solution. Brett enables an entire team to be notified in the event of dataset refresh failures.</p><h6 id="how-to-save-command-output-to-file-using-command-prompt-or-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190215.md#how-to-save-command-output-to-file-using-command-prompt-or-powershell"/><a href="https://www.windowscentral.com/how-save-command-output-file-using-command-prompt-or-powershell"><em>How to save command output to file using Command Prompt or PowerShell</em></a><a class="ps-heading-anchor" href="#how-to-save-command-output-to-file-using-command-prompt-or-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mauro Huculak on February 12th</p><p>It&rsquo;s a simple but useful tip. Redirecting your output for later review or sharing can be handy for any number of scenarios.</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190215.md#reddit-rpowershell---popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/aoz36i/made_a_suite_of_powershell_gui_spelling_games_for/"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>PowerShell for education! /u/Crimson_89 created a collection of GUI spelling games for their kids. Be sure to check out the repo in the comments.</p><h6 id="youtube-powershell-x2665xfe0f-vscode" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190215.md#youtube-powershell-%EF%B8%8F-vscode"/><a href="https://www.youtube.com/watch?v=tQLDRYIhmy0"><em>YouTube: PowerShell ♥️ VSCode</em></a><a class="ps-heading-anchor" href="#youtube-powershell-x2665xfe0f-vscode" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Presenting to the Dutch PowerShell User Group, Tyler Leonhardt demonstrates many of the finer features of VSCode with the PS extension.</p>]]></content:encoded></item><item><title>Tips for Writing Cross-Platform PowerShell Code</title><link>https://powershell.org/articles/2019-02-14-tips-for-writing-cross-platform-powershell-code/</link><guid>https://powershell.org/articles/2019-02-14-tips-for-writing-cross-platform-powershell-code/</guid><pubDate>Thu, 14 Feb 2019 18:17:40 +0000</pubDate><description>&lt;p&gt;I just spent a month updating &lt;a href="https://www.powershellgallery.com/packages/Whiskey/"&gt;one of our PowerShell modules&lt;/a&gt; to support Linux and MacOS. I learned a lot that I wanted to share with the community as cross-platform support becomes more and more important.&lt;/p&gt;
&lt;h2 id="use-environment-class-properties-instead-of-env-drive" class="ps-heading wp-block-heading"&gt;Use &amp;ldquo;Environment&amp;rdquo; Class Properties Instead of &amp;ldquo;env:&amp;rdquo; Drive&lt;a class="ps-heading-anchor" href="#use-environment-class-properties-instead-of-env-drive" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;Environment variables are different between the different operating systems. All of them have&lt;/p&gt;
&lt;p&gt;&lt;code&gt;PATH &lt;/code&gt;, but not much else. Windows and MacOS both have variables for the temp directory, but they have different names.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I just spent a month updating<a href="https://www.powershellgallery.com/packages/Whiskey/">one of our PowerShell modules</a> to support Linux and MacOS. I learned a lot that I wanted to share with the community as cross-platform support becomes more and more important.</p><h2 id="use-environment-class-properties-instead-of-env-drive" class="ps-heading wp-block-heading">Use &ldquo;Environment&rdquo; Class Properties Instead of &ldquo;env:&rdquo; Drive<a class="ps-heading-anchor" href="#use-environment-class-properties-instead-of-env-drive" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Environment variables are different between the different operating systems. All of them have</p><p><code>PATH</code>, but not much else. Windows and MacOS both have variables for the temp directory, but they have different names.</p><p>Instead of using environment variables like</p><p><code>$env:USERNAME</code>, use the</p><p><a href="https://docs.microsoft.com/en-us/dotnet/api/system.environment">static properties on the Environment class instead</a>. They return the correct values across operating systems.</p><p>`Instead Of Use</p><hr><p>$env:USERNAME [Environment]::UserName
$env:COMPUTERNAME [Environment]::MachineName</p><p>n [Environment]::NewLine<code>r</code>n [Environment]::NewLine
$env:TEMP [IO.Path]::GetTempDirectory()</p><p>The</p><p><code>Environment</code>class also has neat properties like</p><p><code>Is64BitProcess</code>,</p><p><code>Is64BitOperatingSystem</code>, and</p><p><code>UserInteractive</code>, which aren&rsquo;t exposed in the</p><p><code>env:</code>drive.</p><h2 id="use-the-same-case-when-readingsetting-environment-variables" class="ps-heading wp-block-heading">Use the Same Case When Reading/Setting Environment Variables<a class="ps-heading-anchor" href="#use-the-same-case-when-readingsetting-environment-variables" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Environment variable names are case-sensitive on MacOS and Linux, regardless of how you access them. So,</p><p><code>$env:Path [Environment]::GetEnvironmentVariable('Path')</code>would return nothing on MacOS or Linux, because the path environment variable is</p><p><code>PATH</code>on those platforms. Since environment variable names are case-insensitive on Windows, you should prefer the case from Linux/MacOS.</p><h2 id="always-use-join-path-to-create-path-strings" class="ps-heading wp-block-heading">Always Use &ldquo;Join-Path&rdquo; to Create Path Strings<a class="ps-heading-anchor" href="#always-use-join-path-to-create-path-strings" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><h3 id="when-the-path-originates-in-your-code" class="ps-heading wp-block-heading">When the Path Originates in Your Code<a class="ps-heading-anchor" href="#when-the-path-originates-in-your-code" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Never, ever put paths together with strings, e.g.</p><p><code>"BasePath\ChildPath"</code>. That path won&rsquo;t work on Linux or MacOS because their file systems see the</p><p><code>\</code>character as an escape character, not a directory separator. Instead, use</p><p><code>Join-Path</code>. Not only does it use the correct directory separator, but it converts directory separators to the directory separator for the current platform.</p><p>For example,</p><p><code>Join-Path -Path '\usr\bin' -ChildPath 'dotnet'</code>returns</p><p><code>/usr/bin/dotnet</code>on Linux/MacOS and</p><p><code>\usr\bin\dotnet</code>on Windows.</p><h3 id="when-the-path-comes-from-the-user" class="ps-heading wp-block-heading">When the Path Comes from the User<a class="ps-heading-anchor" href="#when-the-path-comes-from-the-user" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>In one situation, our module took in a path from the user via a configuration file. Normally, we would use</p><p><code>Resolve-Path</code>to get the full path to the file, which normalizes the directory separator, but in this situation, the path may be to a file the user wants us to create and</p><p><code>Resolve-Path</code>requires that the path exists. Here&rsquo;s how we got our paths normalized:</p><p>`# If the user didn&rsquo;t give us an absolute path,</p><h1 id="resolve-it-from-the-current-directory" class="ps-heading">resolve it from the current directory.<a class="ps-heading-anchor" href="#resolve-it-from-the-current-directory" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>if( -not [IO.Path]::IsPathRooted($archivePath) )
{
$archivePath = Join-Path -Path (Get-Location).Path -ChildPath $archivePath
}
$archivePath = Join-Path -Path $archivePath -ChildPath &lsquo;.&rsquo;
$archivePath = [IO.Path]::GetFullPath($archivePath)
`This trick relies on:</p><ul><li/></ul><p><code>Join-Path</code>normalizing our directory separators (line 7) and</p><ul><li>The<code>GetFullPath</code>method on the</li></ul><p><code>IO.Path</code>object replacing</p><p><code>..</code>and</p><p><code>.</code>characters to the parent/current item name, respectively (line 8).</p><p>This way we don&rsquo;t have to use regular expressions. We let .NET Core/PowerShell do that work for us.</p><h2 id="use-iopathdirectoryseparatorchar-when-you-cant-use-join-path" class="ps-heading wp-block-heading">Use &ldquo;[IO.Path]::DirectorySeparatorChar&rdquo; When You Can&rsquo;t Use &ldquo;Join-Path&rdquo;<a class="ps-heading-anchor" href="#use-iopathdirectoryseparatorchar-when-you-cant-use-join-path" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>If for some reason you can&rsquo;t use</p><p><code>Join-Path</code>to create a path or our strategy above, instead of hard-coding the directory separator character, use the</p><p><code>[IO.Path]::DirectorySeparatorChar</code>property to get the correct separator for the current operating system. For example,</p><p><code>'ParentPath{0}ChildPath' -f [IO.Path]::DirectorySeparatorChar</code>## Don&rsquo;t Use the &ldquo;-Qualifier&rdquo; Switch on &ldquo;Split-Path&rdquo; {.wp-block-heading}</p><p>In some of our tests, we want to create a path on the current drive:</p><p><code>$drive = Split-Path -Qualifier -Path $PSScriptRoot $path = Join-Path -Path $drive -ChildPath 'SomePath'</code>This doesn&rsquo;t work on Linux/MacOS because &ldquo;Qualifier&rdquo; is synonomous with &ldquo;Drive&rdquo; and only Windows has the concept of a drive. Instead, use the</p><p><code>PSDrive</code>property on the</p><p><code>FileInfo</code>object for the current file (or whatever file whose root path you want) to get the root path:</p><p><code>$root = (Get-Item -Path $PSScriptRoot).PSDrive.Root $path = Join-Path -Path $root -ChildPath 'SomePath'</code>The above code returns</p><p><code>/SomePath</code>on Linux/MacOS and</p><p><code>C:\SomePath</code>on Windows (assuming the current script is on the C: drive).</p><h2 id="use-the-same-case-for-hashtable-keys" class="ps-heading wp-block-heading">Use the Same Case for Hashtable Keys<a class="ps-heading-anchor" href="#use-the-same-case-for-hashtable-keys" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>On Linux, hashtable keys are case-sensitive. On Windows and MacOS, they aren&rsquo;t. So,</p><p><code>$ht = @{ 'Key' = 'Value' } $ht['KEY']</code>returns</p><p><code>Value</code>on Windows and MacOS, and</p><p><code>$null</code>on Linux.</p><h2 id="dont-use-aliases" class="ps-heading wp-block-heading">Don&rsquo;t Use Aliases<a class="ps-heading-anchor" href="#dont-use-aliases" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Don&rsquo;t use PowerShell&rsquo;s aliases in your scripts. They are different between operating systems. Many of the aliases on Windows were originally added to help non-Windows users find familiar commands, e.g.</p><p><code>ls</code>mapping to</p><p><code>Get-ChildItem</code>. We had one test fixture that was using</p><p><code>sc</code>instead of</p><p><code>Set-Content</code>. Those tests failed when run under Linux.</p><h2 id="use-iopathpathseparator-for-path-environment-variable" class="ps-heading wp-block-heading">Use &ldquo;[IO.Path]::PathSeparator&rdquo; for &ldquo;PATH&rdquo; Environment Variable<a class="ps-heading-anchor" href="#use-iopathpathseparator-for-path-environment-variable" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Windows uses a different path separator than Linux/MacOS for paths in the</p><p><code>PATH</code>environment variable. Windows uses</p><p><code>;</code>. Linux/MacOS use</p><p><code>:</code>. Instead of hard-coding those characters, use the</p><p><code>[IO.Path]::PathSeparator</code>property to use the correct separator for the current operating system. For example, this code shows how to split/join the</p><p><code>PATH</code>environment variable in a cross-platform way:</p><p>`# Get each path in the PATH environment variable.
$env:PATH -split [IO.Path]::PathSeparator</p><h1 id="add-a-path-to-the-current-sessions-path-environment-variable" class="ps-heading">Add a path to the current session&rsquo;s PATH environment variable<a class="ps-heading-anchor" href="#add-a-path-to-the-current-sessions-path-environment-variable" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>$env:PATH = &lsquo;{0}{1}{2}&rsquo; -f $env:PATH,[IO.Path]::PathSeparator,$NewPath
`## Warning: Windows Executables Run Under the Windows Subsystem for Linux {.wp-block-heading}</p><p>The Windows Subsytem for Linux is great. We used it a lot to get our module working under Linux instead of spinning up an entire VM. Even though it&rsquo;s running Linux, it&rsquo;s still on Windows, so Windows executables can still run. This is awesome but be mindful of the trade-off: if you have tests or code that run Windows executables, they&rsquo;ll appear to run fine under WSL, but fail when actually run on a Linux machine.</p><h2 id="omit-the-extension-when-searching-for-or-running-executables" class="ps-heading wp-block-heading">Omit the Extension When Searching for or Running Executables<a class="ps-heading-anchor" href="#omit-the-extension-when-searching-for-or-running-executables" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>On Windows, executable files have the</p><p><code>.exe</code>extension. On Linux/MacOS, an executable has file system permissions that mark a file as executable. If you&rsquo;re searching for or running a command that could exist on all operating systems, omit the extension from the name. On Windows, PowerShell will implicitly add the</p><p><code>.exe</code>extension for you (it actually uses the extensions in the</p><p><code>PATHEXT</code>environment variable to look for commands). For example, this code will return the path to the .NET Core and Node.js executables, if they exist in your</p><p><code>PATH</code>:</p><p>`# Finding commands
Get-Command -Name &lsquo;dotnet&rsquo; -ErrorAction Ignore
Get-Command -Name &rsquo;node&rsquo; -ErrorAction Ignore</p><h1 id="running-commands" class="ps-heading">Running commands<a class="ps-heading-anchor" href="#running-commands" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>dotnet &ndash;version
node &ndash;version
`If your commands exists outside a directory in your</p><p><code>PATH</code>environment variable, consider adding that directory to your</p><p><code>PATH</code>either permanently or temporarily so you don&rsquo;t have to build the logic of cross-platform executable naming yourself.</p><h2 id="supporting-windows-powershell-and-powershell-core" class="ps-heading wp-block-heading">Supporting Windows PowerShell and PowerShell Core<a class="ps-heading-anchor" href="#supporting-windows-powershell-and-powershell-core" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Some changes we encountered between operating systems weren&rsquo;t because of the operating systems but because we use PowerShell 5.1 on Windows. PowerShell 6 behaves differently from PowerShell 5.1 in some ways.</p><h3 id="use-the-fullname-property-on-fileinfo-and-directoryinfo-objects" class="ps-heading wp-block-heading">Use the &ldquo;FullName&rdquo; Property on &ldquo;FileInfo&rdquo; and &ldquo;DirectoryInfo&rdquo; Objects<a class="ps-heading-anchor" href="#use-the-fullname-property-on-fileinfo-and-directoryinfo-objects" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>In some situations converting</p><p><code>FileInfo</code>and</p><p><code>DirectoryInfo</code>objects to strings (i.e. the objects returned by using</p><p><code>Get-ChildItem</code>against the file system) behave differently. On Windows PowerShell, you&rsquo;ll get just the file&rsquo;s name. On PowerShell Core, you&rsquo;ll get the item&rsquo;s full name.</p><p>For example, this snippet returns each item&rsquo;s name on Windows PowerShell and each item&rsquo;s full name on PowerShell Core:</p><p><code>Get-ChildItem | ForEach-Object { [string]$_ }</code>Instead, use the</p><p><code>FullName</code>property to get the full path or</p><p><code>Name</code>to get just the name:</p><p>`# Returns each item&rsquo;s full path
Get-ChildItem | ForEach-Object { $_.FullName }</p><h1 id="returns-each-items-name" class="ps-heading">Returns each item&rsquo;s name<a class="ps-heading-anchor" href="#returns-each-items-name" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>Get-ChildItem | ForEach-Object { $_.Name }
`### Use an Empty Error Type and Capability Checking When Handling &ldquo;Invoke-WebRequest&rdquo; Failures {.wp-block-heading}</p><p>The exception thrown by</p><p><code>Invoke-WebRequest</code>is different between Windows PowerShell and PowerShell Core. On Windows PowerShell, it is a</p><p><a href="https://docs.microsoft.com/en-us/dotnet/api/system.net.webexception">System.Net.WebException</a>. On PowerShell Core, it is a<a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.httpresponseexception?view=pscore-6.0.0">Microsoft.PowerShell.Commands.HttpResponseException</a>.</p><p>So, if you were handling failed web requests like this:</p><p><code>$uri = 'https://httpstat.us/500' try { Invoke-WebRequest -Uri $uri } catch [Net.WebException] { Write-Error -Message ('Failed requesting "{0}": {1}' -f $uri,$_.ErrorDetails) }</code>You should instead do:</p><p><code>$uri = 'https://httpstat.us/500' try { Invoke-WebRequest -Uri $uri } catch { $errorDetails = $null $response = $_.Exception | Select-Object -ExpandProperty 'Response' -ErrorAction Ignore if( $response ) { $errorDetails = $_.ErrorDetails } # Not an exception making the request or the failed request didn't have a response body. if( $errorDetails -eq $null ) { Write-Error -ErrorRecord $_ } else { Write-Error -Message ('Request to "{0}" failed: {1}' -f $uri,$errorDetails) } }</code>Notice that instead of checking what version of PowerShell we&rsquo;re on to know if the</p><p><code>ErrorDetails</code>contains the error&rsquo;s response body, we instead check for the existence of the</p><p><code>Response</code>property on the thrown exception. This property exists on the exception objects thrown by Windows PowerShell and PowerShell Core. This is called a capability check and is the preferred pattern for supporting different ways of doing things across versions and operating systems. When you check for functionality instead of versions, your code will work in more places.</p><h3 id="use-iswindows-islinux-and-ismacos-variables-sparingly" class="ps-heading wp-block-heading">Use &ldquo;IsWindows&rdquo;, &ldquo;IsLinux&rdquo;, and &ldquo;IsMacOS&rdquo; Variables<em>Sparingly</em><a class="ps-heading-anchor" href="#use-iswindows-islinux-and-ismacos-variables-sparingly" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>PowerShell 6 introduces three global variables that you can use to check which platform you&rsquo;re on. You should use these sparingly, and instead use capability checks (see above). If you absolutely need to know what operating system you&rsquo;re on, the</p><p><code>IsWindows</code>,</p><p><code>IsLinux</code>, and</p><p><code>IsMacOS</code>variables work great.</p><p>We turn on strict mode in all our scripts (i.e.</p><p><code>Set-StrictMode -Version 'Latest'</code>), so we can&rsquo;t just use these variables without getting errors on Windows PowerShell. Since they were introduced in PowerShell 6, and that version of PowerShell is the first to run on Linux and MacOS, if any of the variables don&rsquo;t exist, you know you&rsquo;re on Windows. If you have code/modules that need to run on Windows PowerShell</p><p><em>and</em> PowerShell Core, you can use this snippet to conditionally create these variables:</p><p><code>if( -not (Test-Variable 'variable:IsWindows') ) { # We know we're on Windows PowerShell 5.1 or earlier $IsWindows = $true $IsLinux = $IsMacOS = $false }</code>Be a good script/module neighbor by<em>not</em> making these global and instead restricting them to your script/module scope.</p><p>Thanks to<a href="https://github.com/DecoyJoe">Joseph Larionov</a>, who helped edit this article.</p>
]]></content:encoded></item><item><title>IRON SCRIPTER 2019 BEGINS!</title><link>https://powershell.org/articles/2019-02-13-iron-scripter-2019-begins/</link><guid>https://powershell.org/articles/2019-02-13-iron-scripter-2019-begins/</guid><pubDate>Wed, 13 Feb 2019 22:32:50 +0000</pubDate><description>&lt;p&gt;Go to &lt;a href="https://ironscripter.us/iron-scripter-2019-is-coming/"&gt;https://ironscripter.us/iron-scripter-2019-is-coming/&lt;/a&gt; right away!&lt;/p&gt;
&lt;p&gt;Even if you&amp;rsquo;re not attending Summit, these challenges are a great thing to jump into. They&amp;rsquo;re a fun chance to flex your PowerShell sk1llz, and the official Iron Scripter competition permits remote assistance to each of our three factions - so you can get in on the action from afar!&lt;/p&gt;
&lt;p&gt;We suggest using tags #battlefaction, #daybreakfaction, and #flawlessfaction, and #ironscripter2019 to hook up with fellow coders on social media. Visit the main &lt;a href="http://ironscripter.us"&gt;Iron Scripter&lt;/a&gt; website to learn more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Go to<a href="https://ironscripter.us/iron-scripter-2019-is-coming/">https://ironscripter.us/iron-scripter-2019-is-coming/</a> right away!</p><p>Even if you&rsquo;re not attending Summit, these challenges are a great thing to jump into. They&rsquo;re a fun chance to flex your PowerShell sk1llz, and the official Iron Scripter competition permits remote assistance to each of our three factions - so you can get in on the action from afar!</p><p>We suggest using tags #battlefaction, #daybreakfaction, and #flawlessfaction, and #ironscripter2019 to hook up with fellow coders on social media. Visit the main<a href="http://ironscripter.us">Iron Scripter</a> website to learn more.</p><p>Not even sure how to join a faction? It&rsquo;s easy: read up on &rsquo;em and decide which one fits you. Then get in touch with your like-minded scripters. Arrange to communicate via Slack, Teams, GitHub, carrier pigeon, or whatever - Iron Scripter is all about mystery and ad-hoc, not about formal structures or rules.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 8-February-2019</title><link>https://powershell.org/articles/2019-02-08-icymi-powershell-week-of-8-february-2019/</link><guid>https://powershell.org/articles/2019-02-08-icymi-powershell-week-of-8-february-2019/</guid><pubDate>Fri, 08 Feb 2019 16:00:03 +0000</pubDate><description>&lt;p&gt;Topics include adrenaline for your AKS deployments, Azure Pipelines, Universal Dashboard, and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include adrenaline for your AKS deployments, Azure Pipelines, Universal Dashboard, and more.</p><p>Content scoured by Brett Bunker, Robin Dadswell, and Mark Roloff.</p><h6 id="deploying-a-production-ready-azure-kubernetes-aks-cluster-with-psaksdeployment" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#deploying-a-production-ready-azure-kubernetes-aks-cluster-with-psaksdeployment"/><a href="https://mathieubuisson.github.io/deploying-aks-cluster-psaksdeployment/"><em>Deploying a production-ready Azure Kubernetes (AKS) cluster with PSAksDeployment</em></a><a class="ps-heading-anchor" href="#deploying-a-production-ready-azure-kubernetes-aks-cluster-with-psaksdeployment" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mathieu Buisson on February 4th</p><p>Deploying AKS the officially documented way? Give this a read. Mathieu gives a great look into using this souped-up module to do some heavy lifting for you.</p><h6 id="powershell-function-to-connect-to-all-office-365-services-with-support-for-mfa" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#powershell-function-to-connect-to-all-office-365-services-with-support-for-mfa"/><a href="https://www.thelazyadministrator.com/2019/02/05/powershell-function-to-connect-to-all-office-365-services-with-support-for-mfa/"><em>PowerShell Function to Connect to All Office 365 Services With Support For MFA</em></a><a class="ps-heading-anchor" href="#powershell-function-to-connect-to-all-office-365-services-with-support-for-mfa" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brad Wyatt on February 5th</p><p>Say goodbye to your ugly &ldquo;Log-into-too-many-PowerShell-cloud-services&rdquo; script and say hello to Brad&rsquo;s one-stop function. I can already think of a few places to start using this.</p><h6 id="the-top-6-powershell-commands-you-need-to-know-to-manage-office-365" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#the-top-6-powershell-commands-you-need-to-know-to-manage-office-365"/><a href="https://practical365.com/microsoft-365/the-top-6-powershell-commands-you-need-to-know-to-manage-office-365/"><em>The top 6 PowerShell commands you need to know to manage Office 365</em></a><a class="ps-heading-anchor" href="#the-top-6-powershell-commands-you-need-to-know-to-manage-office-365" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Steve Goodman on February 5th</p><p>If you&rsquo;re managing O365 and are new to PowerShell, this is a great little intro to the language from that perspective.</p><h6 id="retry-commands-in-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#retry-commands-in-powershell"/><a href="https://ridicurious.com/2019/02/01/retry-command-in-powershell/"><em>Retry Commands in PowerShell</em></a><a class="ps-heading-anchor" href="#retry-commands-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Prateek Singh on February 1st</p><p>Prateek has thrown together a very nice function that&rsquo;s tailor-made to handle all of your retry logic. Give it a whirl in your next script!</p><h6 id="how-i-failed-my-way-to-success-with-azure-pipelines---part-1-build" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#how-i-failed-my-way-to-success-with-azure-pipelines---part-1-build"/><a href="https://king.geek.nz/2019/02/07/how-i-failed-my-way-to-success-with-azure-pipelines/"><em>How I Failed My Way to Success with Azure Pipelines - Part 1: Build</em></a><a class="ps-heading-anchor" href="#how-i-failed-my-way-to-success-with-azure-pipelines---part-1-build" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Josh King on February 7th</p><p>If you&rsquo;ve got a public PowerShell project, consider hooking it up with in a release pipeline. Josh&rsquo;s first experiences with that will be a helpful guide in figuring that out.</p><h6 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#tweet-of-the-week"/><a href="https://twitter.com/BrettMiller_IT/status/1092062887957446657"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>I love RDCMan, so I was pretty stoked to find out that there&rsquo;s a module for generating its config files. Thanks, Brett!</p><h6 id="azposh-powershell-universal-dashboard" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190208.md#azposh-powershell-universal-dashboard"/><a href="https://www.youtube.com/watch?v=fl1RfXmjvPA"><em>AZPosh: PowerShell Universal Dashboard</em></a><a class="ps-heading-anchor" href="#azposh-powershell-universal-dashboard" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Curious about Universal Dashboard? Adam Driscoll gives a tour of this awesome tool to the Arizona PSUG.</p>]]></content:encoded></item><item><title>Summit Expansion – Seeking Feedback</title><link>https://powershell.org/articles/2019-02-07-summit-expansion-seeking-feedback/</link><guid>https://powershell.org/articles/2019-02-07-summit-expansion-seeking-feedback/</guid><pubDate>Thu, 07 Feb 2019 16:00:21 +0000</pubDate><description>&lt;p&gt;Tickets for the 2019 PowerShell + DevOps Summit sold out faster this year than its predecessors by almost exactly a full month. We are all so very excited to see everyone this year at the Meydenbauer in Bellevue, Washington! But as we continue to outpace each year, we also understand that this means that the demand for the content we deliver at Summit is also growing .&lt;/p&gt;
&lt;p&gt;One of the early goals of the Summit was to keep the event relatively small to provide a more intimate feel. In doing so, it allows attendees a chance to see familiar faces as they come back every year, and have a chance to interact with the speakers, staff, and members of the PowerShell team. As the event has grown, we&amp;rsquo;ve been very careful to not lose that feel. So the question then is, what do we do in order to meet the demands of the community, and maintain that small event feel?&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Tickets for the 2019 PowerShell + DevOps Summit sold out faster this year than its predecessors by almost exactly a full month. We are all so very excited to see everyone this year at the Meydenbauer in Bellevue, Washington! But as we continue to outpace each year, we also understand that this means that the demand for the content we deliver at Summit is also growing .</p><p>One of the early goals of the Summit was to keep the event relatively small to provide a more intimate feel. In doing so, it allows attendees a chance to see familiar faces as they come back every year, and have a chance to interact with the speakers, staff, and members of the PowerShell team. As the event has grown, we&rsquo;ve been very careful to not lose that feel. So the question then is, what do we do in order to meet the demands of the community, and maintain that small event feel?</p><p>James Petty (our CFO), Jeffrey Bernt (our logistics manager), and I have been having this very discussion over the last couple of months. We&rsquo;ve been doing a lot of homework on the resources it would require to organize and hold a second event. What would the goals of the event be? When do we have it? And so on, and so forth.</p><p>That&rsquo;s where you come in!</p><p>We&rsquo;re looking for some community feedback in helping us shape this second event. We&rsquo;ve put together a short survey (link below) to help us make some decisions on key questions as we look toward moving forward on this project. Ultimately, our goal is to provide the community with the best educational content possible, and there&rsquo;s no better way to do that than to keep you involved in the decisions that affect that content. We&rsquo;ll keep the survey open for a couple of weeks, and share the responses with you after the close.</p><p>From the team here at The DevOps Collective, we&rsquo;re all looking forward to growing with you in the coming future!</p><p><a href="https://survey.sogosurvey.com/r/4ZIAzl">https://survey.sogosurvey.com/r/4ZIAzl</a></p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 1-February-2019</title><link>https://powershell.org/articles/2019-02-01-icymi-powershell-week-of-1-february-2019/</link><guid>https://powershell.org/articles/2019-02-01-icymi-powershell-week-of-1-february-2019/</guid><pubDate>Fri, 01 Feb 2019 16:00:40 +0000</pubDate><description>&lt;p&gt;Topics include Active Directory FSMO Roles, text parsing, error handling, and much more.&lt;/p&gt;
&lt;p&gt;Content pulled together by Robin Dadswell, Mark Roloff , and Brett Bunker.&lt;/p&gt;
&lt;h3 id="finding-active-directory-fsmo-role-holders-with-powershell" class="ps-heading wp-block-heading"&gt;&lt;a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#finding-active-directory-fsmo-role-holders-with-powershell"&gt;&lt;/a&gt;&lt;a href="https://mcpmag.com/articles/2019/01/25/finding-ad-fsmo-role-holders.aspx?m=1"&gt;&lt;em&gt;Finding Active Directory FSMO Role Holders with PowerShell&lt;/em&gt;&lt;/a&gt;&lt;a class="ps-heading-anchor" href="#finding-active-directory-fsmo-role-holders-with-powershell" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;by Adam Bertram January 25&lt;/p&gt;
&lt;p&gt;Need to find which DCs hold your FSMO roles? Adam demonstrates a quick way to find their location using PowerShell.&lt;/p&gt;
&lt;h3 id="parsing-text-with-powershell-33" class="ps-heading wp-block-heading"&gt;&lt;a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#parsing-text-with-powershell-33"&gt;&lt;/a&gt;&lt;a href="https://blogs.msdn.microsoft.com/powershell/2019/01/28/parsing-text-with-powershell-3-3/"&gt;&lt;em&gt;Parsing Text with PowerShell (3/3)&lt;/em&gt;&lt;/a&gt;&lt;a class="ps-heading-anchor" href="#parsing-text-with-powershell-33" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h3&gt;
&lt;p&gt;by Steve Lee [MSFT] January 28&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include Active Directory FSMO Roles, text parsing, error handling, and much more.</p><p>Content pulled together by Robin Dadswell, Mark Roloff , and Brett Bunker.</p><h3 id="finding-active-directory-fsmo-role-holders-with-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#finding-active-directory-fsmo-role-holders-with-powershell"/><a href="https://mcpmag.com/articles/2019/01/25/finding-ad-fsmo-role-holders.aspx?m=1"><em>Finding Active Directory FSMO Role Holders with PowerShell</em></a><a class="ps-heading-anchor" href="#finding-active-directory-fsmo-role-holders-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Adam Bertram January 25</p><p>Need to find which DCs hold your FSMO roles? Adam demonstrates a quick way to find their location using PowerShell.</p><h3 id="parsing-text-with-powershell-33" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#parsing-text-with-powershell-33"/><a href="https://blogs.msdn.microsoft.com/powershell/2019/01/28/parsing-text-with-powershell-3-3/"><em>Parsing Text with PowerShell (3/3)</em></a><a class="ps-heading-anchor" href="#parsing-text-with-powershell-33" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Steve Lee [MSFT] January 28</p><p>Part 3 in the series on parsing text with PowerShell. A nice wrap up to the series with some example uses.</p><h3 id="how-to-create-multi-dimensional-arrays-in-powershell" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#how-to-create-multi-dimensional-arrays-in-powershell"/><a href="https://redmondmag.com/articles/2019/01/28/multi-dimensional-powershell-arrays.aspx?m=1"><em>How To Create Multi-Dimensional Arrays in PowerShell</em></a><a class="ps-heading-anchor" href="#how-to-create-multi-dimensional-arrays-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Brien Posey January 28</p><p>Do you need to go beyond basic arrays? Brien shows you how to create and use multi-demonsional arrays</p><h3 id="powershell-dont-just-throw" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#powershell-dont-just-throw"/><a href="https://jamesone111.wordpress.com/2019/01/30/powershell-dont-just-throw/"><em>PowerShell. Don’t Just Throw</em></a><a class="ps-heading-anchor" href="#powershell-dont-just-throw" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by James O&rsquo;Neill January 30</p><p>Why put a Return after a Throw? James gives some examples of why to use this technique in your error handling.</p><h3 id="error-handling-in-powershell---best-practices" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#error-handling-in-powershell---best-practices"/><a href="https://vexx32.github.io/2019/01/31/PowerShell-Error-Handling/"><em>Error Handling in PowerShell - Best Practices</em></a><a class="ps-heading-anchor" href="#error-handling-in-powershell---best-practices" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Joel (Sallow) Francis January 31</p><p>Terminating errors? Non-Terminating errors? Joel explains them both and how to handle them in your code.</p><h3 id="reddit-rpowershell---most-popular-weekly-post" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#reddit-rpowershell---most-popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/algkuo/listing_office365_outages/?st=jrl8papk&amp;sh=3e8672fc"><em>Reddit /r/PowerShell - Most Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Listing Office365 Outages</p><h3 id="tweet-of-the-week" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#tweet-of-the-week"/><a href="https://twitter.com/Steve_MSFT/status/1090393625781972992"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>What are some cool things you&rsquo;ve added to your prompt?</p><h3 id="set-clipboard---using-powershell-to-read-and-set-the-clipboard-in-windows" class="ps-heading wp-block-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190201.md#set-clipboard---using-powershell-to-read-and-set-the-clipboard-in-windows"/><a href="https://www.youtube.com/watch?v=TBRdvzcxS54"><em>Set-Clipboard - Using PowerShell to read and set the clipboard in Windows</em></a><a class="ps-heading-anchor" href="#set-clipboard---using-powershell-to-read-and-set-the-clipboard-in-windows" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>John Impallomeni showing some clipboard magic from Powershell.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 25-January-2019</title><link>https://powershell.org/articles/2019-01-25-icymi-powershell-week-of-25-january-2019/</link><guid>https://powershell.org/articles/2019-01-25-icymi-powershell-week-of-25-january-2019/</guid><pubDate>Fri, 25 Jan 2019 16:39:42 +0000</pubDate><description>&lt;p&gt;Topics include SCCM, DSC, an intro for people in infosec, sweet dashboards, and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include SCCM, DSC, an intro for people in infosec, sweet dashboards, and more.</p><p>Content pulled together by Brett Bunker, Robin Dadswell, and the less-than-punctual this week Mark Roloff.</p><h6 id="wake-up-single-computer-or-collection-of-computers-in-configmgr-1810-using-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#wake-up-single-computer-or-collection-of-computers-in-configmgr-1810-using-powershell"/><a href="https://ccmexec.com/2019/01/wake-up-single-computer-or-collection-of-computers-in-configmgr-1810-using-powershell/"><em>Wake up single Computer or collection of Computers in ConfigMgr 1810 using PowerShell</em></a><a class="ps-heading-anchor" href="#wake-up-single-computer-or-collection-of-computers-in-configmgr-1810-using-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Jörgen Nilsson on January 22nd<br>
SCCM has a fancy new way of waking systems and Jörgen walks through how to get that setup, and initiate the wake up from PowerShell.</p><h6 id="logging-powershell-scripts" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#logging-powershell-scripts"/><a href="https://powershell.getchell.org/2019/01/23/logging-powershell-scripts/"><em>Logging PowerShell Scripts</em></a><a class="ps-heading-anchor" href="#logging-powershell-scripts" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Nicholas M. Getchell on January 23rd<br>
Log files are an invaluable tool, so why not include the functionality in your scripts? Nicholas shares a few methods for accomplishing this.</p><h6 id="applying-basic-system-configuration-using-powershell-dsc" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#applying-basic-system-configuration-using-powershell-dsc"/><a href="https://www.markou.me/2019/01/applying-basic-system-configuration-using-powershell-dsc/"><em>Applying basic system configuration using PowerShell DSC</em></a><a class="ps-heading-anchor" href="#applying-basic-system-configuration-using-powershell-dsc" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by George Markou on January 20th<br>
If you&rsquo;re looking to take a quick dive into configuration management, George has a nice intro to DSC to help you take that first step.</p><h6 id="parsing-text-with-powershell-23" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#parsing-text-with-powershell-23"/><a href="https://blogs.msdn.microsoft.com/powershell/2019/01/24/parsing-text-with-powershell-2-3/"><em>Parsing Text with PowerShell (2/3)</em></a><a class="ps-heading-anchor" href="#parsing-text-with-powershell-23" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Steve Lee on January 24th<br>
This 2 for 3 in a series from Steve about working with text. You&rsquo;re bound to pick up some handy new tricks in here.</p><h6 id="group-policy-backup-with-a-powershell-script" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#group-policy-backup-with-a-powershell-script"/><a href="https://4sysops.com/archives/group-policy-backup-with-a-powershell/"><em>Group Policy backup with a PowerShell script</em></a><a class="ps-heading-anchor" href="#group-policy-backup-with-a-powershell-script" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mike Kanakos on January 18th<br>
Understandably frustrated with the default behavior, Mike creates a better GPO backup.</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#reddit-rpowershell---popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/ahon00/universal_dashboard_sample/?st=jrc9cq84&amp;sh=ac8d7eb4"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>/u/PorreKaj made a pretty sweet dashboard using the Universal Dashboard and, true to his promise, delivers sample code.</p><h6 id="tweet-of-the-week" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#tweet-of-the-week"/><a href="https://twitter.com/PSPester/status/1087438839227006977"><em>Tweet of the Week</em></a><a class="ps-heading-anchor" href="#tweet-of-the-week" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>A new version of Pester is out: 4.6.0! Time to start polishing up your tests with new functionality.</p><h6 id="youtube-powershell-basics-for-security-professionals-part-1" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190125.md#youtube-powershell-basics-for-security-professionals-part-1"/><a href="https://www.youtube.com/watch?v=B0EsL1j_-qw"><em>Youtube: PowerShell Basics for Security Professionals Part 1</em></a><a class="ps-heading-anchor" href="#youtube-powershell-basics-for-security-professionals-part-1" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Mr Carlos Perez gives a livestreamed presentation for people in infosec dipping into PowerShell.</p>]]></content:encoded></item><item><title>ICYMI: Week of 18-January-2018</title><link>https://powershell.org/articles/2019-01-18-icymi-week-of-18-january-2018/</link><guid>https://powershell.org/articles/2019-01-18-icymi-week-of-18-january-2018/</guid><pubDate>Fri, 18 Jan 2019 15:00:35 +0000</pubDate><description>&lt;h1 id="icymi-powershell-week-of-18-january-2019" class="ps-heading"&gt;ICYMI: PowerShell Week of 18-January-2019&lt;a class="ps-heading-anchor" href="#icymi-powershell-week-of-18-january-2019" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h1&gt;
&lt;p&gt;Topics include SQL Server Errors, Out Verbs, Out-Grid in PS Core, Puzzles, Drawing with PowerShell and more.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<h1 id="icymi-powershell-week-of-18-january-2019" class="ps-heading">ICYMI: PowerShell Week of 18-January-2019<a class="ps-heading-anchor" href="#icymi-powershell-week-of-18-january-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>Topics include SQL Server Errors, Out Verbs, Out-Grid in PS Core, Puzzles, Drawing with PowerShell and more.</p><p>Content filtered through by Brett Bunker and Robin Dadswell.</p><h3 id="resolving-microsoft-sql-server-error-4064-with-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#resolving-microsoft-sql-server-error-4064-with-powershell"/><a href="https://mikefrobbins.com/2019/01/11/resolving-microsoft-sql-server-error-4064-with-powershell/"><em>Resolving Microsoft SQL Server Error 4064 with PowerShell</em></a><a class="ps-heading-anchor" href="#resolving-microsoft-sql-server-error-4064-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Mike F Robbins on January 11th<br>
Learn about how to troubleshoot 4064 errors and more using the dbatools module.</p><h3 id="how-to-use-powershell" class="ps-heading"><a href="https://redmondmag.com/articles/2019/01/11/how-to-use-powershell-out-verb.aspx"><em>How To Use PowerShell&rsquo;s Out Verb</em></a><a class="ps-heading-anchor" href="#how-to-use-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Brien Posey on January 11th<br>
Your screen doesn&rsquo;t have to be PowerShell&rsquo;s only output device. As Brien shows, the Out verb lets you redirect PowerShell&rsquo;s output in a variety of useful ways.</p><h3 id="a-powershell-core-out-gridview-soltion" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#a-powershell-core-out-gridview-soltion"/><a href="https://jdhitsolutions.com/blog/powershell-core/6428/a-powershell-core-out-gridview-solution/"><em>A PowerShell Core Out-GridView Soltion</em></a><a class="ps-heading-anchor" href="#a-powershell-core-out-gridview-soltion" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Jerffery Hicks on January 15th<br>
Were you reluctant to use PowerShell Core because there&rsquo;s no Out-Gridview? Allow me to explain how I solved that problem. In PS Core I can now pipe to ogv!</p><h3 id="schrödinger" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#schr%C3%B6dingers--argumentlist"/><a href="https://blog.iisreset.me/schrodingers-argumentlist/amp/?__twitter_impression=true"><em>Schrödinger&rsquo;s -ArgumentList</em></a><a class="ps-heading-anchor" href="#schr%c3%b6dinger" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Mathias R. Jessen on January 16th<br>
An interesting puzzle about when is a $null value a $null value.</p><h3 id="playing-around-with-systemdrawing-in-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#playing-around-with-systemdrawing-in-powershell"/><a href="https://vexx32.github.io/2019/01/17/Playing-Around-System-Drawing-PowerShell/"><em>Playing Around with System.Drawing in PowerShell</em></a><a class="ps-heading-anchor" href="#playing-around-with-systemdrawing-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>by Joel (Sallow) Francis on January 17th<br>
Some neat features of System.Drawing by the author of PSWordCloud.</p><h3 id="twitter-powershell-cheat-sheet" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#twitter-powershell-cheat-sheet"/><a href="https://twitter.com/LawinnSec/status/1085813519164063744"><em>Twitter: PowerShell Cheat Sheet</em></a><a class="ps-heading-anchor" href="#twitter-powershell-cheat-sheet" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>A useful PowerShell cheat sheet for those that are both new to PowerShell and those that just sometimes need a prompt.</p><h3 id="reddit-rpowershell---popular-weekly-post" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#reddit-rpowershell---popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/ah2adr/moving_files_in_sharepoint_site_with_ps/"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>u/MaDKidGo0DCitY poses an intersting question about how to move many files in a SharePoint site with PowerShell.</p><h3 id="youtube-monthly-meetup---jan-16-2019---chris-gardner---powershell-worst-practices" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190118.md#youtube-monthly-meetup---jan-16-2019---chris-gardner---powershell-worst-practices"/><a href="https://youtu.be/QV-tu2jqPUc"><em>Youtube: Monthly Meetup - Jan 16 2019 - Chris Gardner - PowerShell Worst Practices</em></a><a class="ps-heading-anchor" href="#youtube-monthly-meetup---jan-16-2019---chris-gardner---powershell-worst-practices" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h3><p>Building PowerShell Modules? Learn some development best practices and design tips</p>]]></content:encoded></item><item><title>PowerShell + DevOps Global Summit Cancellation and Waitlist Procedure</title><link>https://powershell.org/articles/2019-01-17-powershell-devops-global-summit-cancellation-and-waitlist-procedure/</link><guid>https://powershell.org/articles/2019-01-17-powershell-devops-global-summit-cancellation-and-waitlist-procedure/</guid><pubDate>Thu, 17 Jan 2019 14:18:40 +0000</pubDate><description>&lt;p&gt;As Summit nears a record sellout (there are 30 tickets remaining as I write this) I want to review our cancellation and waitlist policies and procedures.&lt;br&gt;
After we formally sell out, Eventbrite will start accepting waitlist entries. Use a personal email address that you check regularly; corporate email systems tend to eat the waitlist notifications as spam. If we&amp;rsquo;re able to offer a spot to the waitlist, it&amp;rsquo;ll happen during the week, usually in the morning (US time), and you&amp;rsquo;ll have 24 hours to respond by purchasing a ticket.&lt;br&gt;
Anyone with a ticket can transfer it to someone else. Whoever did the registration needs to simply return to Eventbrite and edit the attendee information. So if you can&amp;rsquo;t go, but someone else in your company can, that&amp;rsquo;s how you do that. You can also email summit@ for assistance. We let this happen until roughly mid-April, at which point we need to order name badges and we stop all transfers. We don&amp;rsquo;t do anything with hotel rooms; that&amp;rsquo;s all on you.&lt;br&gt;
If you need to cancel, e-mail summit@ with your name, email address, and Eventbrite order number. We will release a ticket to the waitlist. They will have 24 hours to complete the purchase of their ticket. If they don&amp;rsquo;t, we&amp;rsquo;ll release the next waitlist entry, and so on. If someone eventually buys a ticket, we&amp;rsquo;ll refund yours. Again, we don&amp;rsquo;t do anything with hotel rooms.&lt;br&gt;
Sometime in mid-April, all of this stops, as we have to start ordering stuff based on current registrations.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As Summit nears a record sellout (there are 30 tickets remaining as I write this) I want to review our cancellation and waitlist policies and procedures.<br>
After we formally sell out, Eventbrite will start accepting waitlist entries. Use a personal email address that you check regularly; corporate email systems tend to eat the waitlist notifications as spam. If we&rsquo;re able to offer a spot to the waitlist, it&rsquo;ll happen during the week, usually in the morning (US time), and you&rsquo;ll have 24 hours to respond by purchasing a ticket.<br>
Anyone with a ticket can transfer it to someone else. Whoever did the registration needs to simply return to Eventbrite and edit the attendee information. So if you can&rsquo;t go, but someone else in your company can, that&rsquo;s how you do that. You can also email summit@ for assistance. We let this happen until roughly mid-April, at which point we need to order name badges and we stop all transfers. We don&rsquo;t do anything with hotel rooms; that&rsquo;s all on you.<br>
If you need to cancel, e-mail summit@ with your name, email address, and Eventbrite order number. We will release a ticket to the waitlist. They will have 24 hours to complete the purchase of their ticket. If they don&rsquo;t, we&rsquo;ll release the next waitlist entry, and so on. If someone eventually buys a ticket, we&rsquo;ll refund yours. Again, we don&rsquo;t do anything with hotel rooms.<br>
Sometime in mid-April, all of this stops, as we have to start ordering stuff based on current registrations.</p>
]]></content:encoded></item><item><title>ICYMI: PowerShell Week of 11-January-2019</title><link>https://powershell.org/articles/2019-01-11-icymi-powershell-week-of-11-january-2019/</link><guid>https://powershell.org/articles/2019-01-11-icymi-powershell-week-of-11-january-2019/</guid><pubDate>Fri, 11 Jan 2019 16:00:56 +0000</pubDate><description>&lt;p&gt;Topics include posting to Teams, creating bootable USBs, fun with paths, and a new module for Dyn managed DNS.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include posting to Teams, creating bootable USBs, fun with paths, and a new module for Dyn managed DNS.</p><p>Content sifted and sorted by Brett Bunker, Robin Dadswell, Mark Roloff, and several cups of questionably roasted Starbucks K-Cups.</p><h6 id="the-powershell-docs-repo-is-moving" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#the-powershell-docs-repo-is-moving"/><a href="https://blogs.msdn.microsoft.com/powershell/2019/01/07/the-powershell-docs-repo-is-moving/"><em>The PowerShell-Docs repo is moving</em></a><a class="ps-heading-anchor" href="#the-powershell-docs-repo-is-moving" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Sean Wheeler on January 7th<br>
If you&rsquo;re at all involved in maintaining the official PowerShell documentation, this is a heads up that the repo is being relocated. Take a look at this post from the PS team for details.</p><h6 id="joining-paths-in-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#joining-paths-in-powershell"/><a href="https://devblackops.io/joining-paths-in-powershell/"><em>Joining Paths in PowerShell</em></a><a class="ps-heading-anchor" href="#joining-paths-in-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Brandon Olin on January 7th<br>
Brandon has a great new post covering some of the various ways that we can handle constructing paths in PowerShell, and some of the considerations that we should keep in mind when thinking about the portability of our tools.</p><h6 id="how-to-trigger-incoming-webhooks-in-microsoft-teams-with-powershell" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#how-to-trigger-incoming-webhooks-in-microsoft-teams-with-powershell"/><a href="https://www.scriptinglibrary.com/languages/powershell/how-to-trigger-incoming-webhooks-in-microsoft-teams-with-powershell/"><em>How to trigger incoming webhooks in Microsoft Teams with Powershell</em></a><a class="ps-heading-anchor" href="#how-to-trigger-incoming-webhooks-in-microsoft-teams-with-powershell" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Paolo Frigo on January 8th<br>
&ldquo;Ya know what? I wish I could have more alerts in my inbox,&rdquo; said no one, ever. If you&rsquo;re using Teams, Paolo has a handy post about how you can send automated alerts to it from PowerShell.</p><h6 id="introducing-the-poshdyndnsapi-module" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#introducing-the-poshdyndnsapi-module"/><a href="https://powershell.anovelidea.org/powershell/module-poshdyndnsapi/"><em>Introducing the PoShDynDnsApi Module</em></a><a class="ps-heading-anchor" href="#introducing-the-poshdyndnsapi-module" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Dave Carrol on January 7th<br>
Should you find yourself using DNS managed by Dyn, you&rsquo;re in luck. There&rsquo;s a module for that now. Or perhaps you just like digging into the code to see how it all works? It&rsquo;s on GitHub, so that&rsquo;s cool. In addition to introducing his module, Dave also covers a few lessons learned during development.</p><h6 id="create-a-bootable-usb-stick-with-powershell-create-bootableusbstick" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#create-a-bootable-usb-stick-with-powershell-create-bootableusbstick"/><a href="https://sid-500.com/2019/01/08/create-a-bootable-usb-stick-with-powershell-create-bootableusbstick/"><em>Create a bootable USB stick with PowerShell (Create-BootableUSBStick)</em></a><a class="ps-heading-anchor" href="#create-a-bootable-usb-stick-with-powershell-create-bootableusbstick" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Patrick Gruenauer on January 8th<br>
A sometimes overlooked application of PowerShell is that it can handily wrap classic cmdline tools. This handy function will tackle creating your boot sticks with some modern razzmatazz.</p><h6 id="powershell--devops-global-summit-2019" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#powershell--devops-global-summit-2019"/><a href="https://powershell.org/summit/"><em>PowerShell + DevOps Global Summit 2019</em></a><a class="ps-heading-anchor" href="#powershell--devops-global-summit-2019" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>If you&rsquo;re still on the fence about joining us for Summit this year, now is a good time to sign up. Tickets to this fantastic line-up of speakers are beginning to get scarce.</p><h6 id="reddit-rpowershell---popular-weekly-post" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#reddit-rpowershell---popular-weekly-post"/><a href="https://www.reddit.com/r/PowerShell/comments/acm9j2/tip_how_to_check_on_the_progress_of_an_already"><em>Reddit /r/PowerShell - Popular Weekly Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---popular-weekly-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>On the chance that you&rsquo;re still working with the ISE, /u/omers has a handy tip to help you check your position in a loop without breaking.</p><h6 id="youtube-azposh-make-your-transition-from-powershell-ise-to-visualstudio-code-painless" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190111.md#youtube-azposh-make-your-transition-from-powershell-ise-to-visual"/><a href="https://www.youtube.com/watch?v=TJfWgcag6Q4"><em>Youtube: AZPosh: Make Your Transition from PowerShell ISE to Visual Studio Code Painless</em></a><a class="ps-heading-anchor" href="#youtube-azposh-make-your-transition-from-powershell-ise-to-visualstudio-code-painless" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Are you still working in the ISE? Keep hearing about this VS Code thing but just haven&rsquo;t looked at it yet? From the Arizona PowerShell Users Group, Timothy Warner has a great presentation this week to help you make the transition to the new editor of choice for PowerShell.</p>]]></content:encoded></item><item><title>ICYMI: PowerShell Weeks of X-mas &amp; 4-January-2019</title><link>https://powershell.org/articles/2019-01-04-icymi-powershell-weeks-of-x-mas-4-january-2019/</link><guid>https://powershell.org/articles/2019-01-04-icymi-powershell-weeks-of-x-mas-4-january-2019/</guid><pubDate>Fri, 04 Jan 2019 16:00:52 +0000</pubDate><description>&lt;p&gt;Topics include checking SCCM patch compliance, a little regex, some more AoC, a deep dive into $null, and PowerShell&amp;hellip;streaming?&amp;hellip; You betcha!&lt;br&gt;
Content pulled together by Brett Bunker, Robin Dadswell, and Mark Roloff&lt;br&gt;
From all of us, we hope you enjoyed your holidays! Our sabbatical is over and things have been understandably quiet the last couple of weeks, so we&amp;rsquo;re adding a little more this week to help make it up to you.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Topics include checking SCCM patch compliance, a little regex, some more AoC, a deep dive into $null, and PowerShell&hellip;streaming?&hellip; You betcha!<br>
Content pulled together by Brett Bunker, Robin Dadswell, and Mark Roloff<br>
From all of us, we hope you enjoyed your holidays! Our sabbatical is over and things have been understandably quiet the last couple of weeks, so we&rsquo;re adding a little more this week to help make it up to you.</p><h6 id="powershell-everything-you-wanted-to-know-about-null" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#powershell-everything-you-wanted-to-know-about-null"/><a href="https://powershellexplained.com/2018-12-23-Powershell-null-everything-you-wanted-to-know/"><em>PowerShell: Everything you wanted to know about $null</em></a><a class="ps-heading-anchor" href="#powershell-everything-you-wanted-to-know-about-null" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Kevin Marquette on December 23rd<br>
Kevin&rsquo;s deep dives deserve their own special place in your bookmarks. Carve out some free time and read on to become a <em>$null</em> expert.</p><h6 id="advent-of-powershell-2018-pt-i" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#advent-of-powershell-2018-pt-i"/><a href="https://blog.iisreset.me/advent-of-powershell-pt-i/"><em>Advent of PowerShell 2018, pt I</em></a><a class="ps-heading-anchor" href="#advent-of-powershell-2018-pt-i" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Mathias R. Jessen on December 25th<br>
Here&rsquo;s another take on the first two AoC challenges, with some really nice explanations for why you should avoid the += operator in favor of more performant alternatives.</p><h6 id="identifying-and-installing-sccm-client-software-updates-remotely-with-powershell-and-trigger-a-vmware-snapshot-before-remediation--part-1-of-3" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#identifying-and-installing-sccm-client-software-updates-remotely-with-powershell-and-trigger-a-vmware-snapshot-before-remediation--part-1-of-3"/><a href="https://byteben.com/bb/identifying-and-installing-sccm-client-software-updates-remotely-with-powershell-and-trigger-a-vmware-snapshot-before-remediation-part-1-of-3/"><em>Identifying and Installing SCCM Client Software Updates Remotely with PowerShell and trigger a VMware Snapshot before Remediation – Part 1 of 3</em></a><a class="ps-heading-anchor" href="#identifying-and-installing-sccm-client-software-updates-remotely-with-powershell-and-trigger-a-vmware-snapshot-before-remediation--part-1-of-3" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Ben Whitmore on December 28th<br>
In charge of managing patching in your environment? Ben has a great post that dives into using PowerShell to audit patch compliance on SCCM clients.</p><h6 id="teams-module-or-graph-api" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#teams-module-or-graph-api"/><a href="https://alexholmeset.blog/2018/12/29/teams-module-or-graph-api/"><em>Teams module or Graph API?</em></a><a class="ps-heading-anchor" href="#teams-module-or-graph-api" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Alexander Holmeset on December 29th<br>
As the Teams module moves along through development, you may wonder when it&rsquo;s appropriate to use the module vs using the Graph API. Alex does a quick comparison to help you see how and where they line up.</p><h6 id="powershell-basics-detecting-if-a-string-ends-with-a-certain-character" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#powershell-basics-detecting-if-a-string-ends-with-a-certain-character"/><a href="https://techcommunity.microsoft.com/t5/ITOps-Talk-Blog/PowerShell-Basics-Detecting-if-a-String-Ends-with-a-Certain/ba-p/307848"><em>PowerShell Basics: Detecting if a String Ends with a Certain Character</em></a><a class="ps-heading-anchor" href="#powershell-basics-detecting-if-a-string-ends-with-a-certain-character" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Anthony Bartolo on January 2nd<br>
Regex is an elusive beast that plenty of us are probably less acquianted with than we should be. We can correct that by just a little with these examples of using it to check the first or last characters in a string.</p><h6 id="adding-caching-to-your-powershell-scripts" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#adding-caching-to-your-powershell-scripts"/><a href="https://tjaddison.com/2018/12/24/Adding-caching-to-your-PowerShell-scripts"><em>Adding caching to your PowerShell scripts</em></a><a class="ps-heading-anchor" href="#adding-caching-to-your-powershell-scripts" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>by Tim Addison on December 24th<br>
Suppose you&rsquo;ve got an expensive function thats needs to be called multiple times. Tim has a clever method for allowing a function to cache its results, thus allowing you to call it repeatedly without going through the initial workload again.</p><h6 id="reddit-rpowershell---most-popular-post" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#reddit-rpowershell---most-popular-post"/><a href="https://www.reddit.com/r/PowerShell/comments/abjl6m/eat_better_in_2018_a_script_to_generate_a_weekly/"><em>Reddit /r/PowerShell - Most Popular Post</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---most-popular-post" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>The applications for PowerShell in a professional environment are legion. But what about at home? And for meal planning? /u/n3rden wrote a script for just that.</p><h6 id="reddit-rpowershell---announcement" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#reddit-rpowershell---announcement"/><a href="https://old.reddit.com/r/PowerShell/comments/a8xtfp/new_powershelllive_switch_channel_will_auto_host/"><em>Reddit /r/PowerShell - Announcement</em></a><a class="ps-heading-anchor" href="#reddit-rpowershell---announcement" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>Worth mentioning&hellip; If the thought of watching livestreams of PowerShell coding is appealing, look no further. A handful of figures in the community are now on Twitch, which can be a good glimple into the thought-process behind their projects. Also be sure to follow the channel on Twitter <a href="https://twitter.com/PowerShellLive">@PowerShellLive</a></p><h6 id="tweet-of-the-weeks" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#tweet-of-the-weeks"/><a href="https://twitter.com/devblackops/status/1078791129967976449"><em>Tweet of the Week(s)</em></a><a class="ps-heading-anchor" href="#tweet-of-the-weeks" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>From @devblackops, here&rsquo;s a brief sample of using GitHub Actions to run PSScriptAnalyzer on a pull request. This could be useful as a quick litmus test for public or group projects.</p><h6 id="youtube-psdayuk-2018" class="ps-heading"><a href="https://github.com/devops-collective-inc/WhatYouMissedThisWeek/blob/master/20190104.md#youtube-psdayuk-2018"/><a href="https://www.youtube.com/playlist?list=PLLKI4jlvx_96sw_FFic9ybQ-3g0RO2cbD"><em>Youtube: PSDay.UK 2018</em></a><a class="ps-heading-anchor" href="#youtube-psdayuk-2018" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h6><p>PSDay.UK happened back in October but videos from the event are up on YouTube now. This playlist has a ton of great content that&rsquo;s well worth your time!</p>
]]></content:encoded></item></channel></rss>