Skip Navigation
pwshguy pwshguy (mdowst) @programming.dev

Father, author, blogger, enthusiast of all things PowerShell and automation. http://linktr.ee/mdowst

Posts 64
Comments 45
PowerShell Weekly for August 23, 2024
  • Community

    • Kubernetes is Easy with Anthony Nocentino
      In this episode of the PowerShell Podcast, we sit down with Anthony Nocentino, a Senior Principal Field Solution Architect at Pure Storage, to dive deep into the world of Kubernetes. Anthony breaks down what Kubernetes is and how it fits into the modern IT landscape. We explore his fascinating career journey, from consulting and SQL Server to educating the masses on Kubernetes and Linux. Anthony also shares invaluable insights on becoming a force multiplier in your career and the critical role of mentorship and offers sage advice for anyone looking to elevate their professional path.
    • PSSaturday Karlsuhe Call for Speakers
      We are excited to announce that we are looking for speakers for the upcoming PSSaturday in Germany this November! Whether you're a first-time speaker or an experienced presenter, we welcome you to share your ideas. If you have an interesting topic and are willing to speak for up to 45 minutes, we want to hear from you.
  • PowerShell Weekly for August 23, 2024
  • Projects, Scripts, and Modules

    Books, Media, and Learning Resources

    • Build a Superfast Research Assistant using PowerShell and AI
      In this episode, I’ll show you how to combine PowerShell with AI to automate tasks, chat with your data, and build intelligent agents—all within your console and scripts.
    • Interactive Data at Your Fingertips: PowerShell AI Converts Data to Interactive HTML
      Transform your data with PowerShell and AI. In this video, Doug Finke, a 15x Microsoft MVP, shows how to use the PSAI module to convert Excel and CSV files into interactive HTML pages. You'll learn how to sort and interact with your data directly in your browser using the new ConvertTo-InteractiveHTML function. Doug walks through generating HTML tables with sortable columns and customizing them using AI. Whether you're managing large datasets or need a quick way to visualize your data, this tutorial will guide you through the process. Install the PSAI module and start making your data more dynamic.
    • How To PowerShell Code in Docker Containers
      In this video, we guide you through the process of installing and running Docker using PowerShell on Windows. Whether you're a beginner or an experienced developer, this step-by-step tutorial will help you get Docker up and running quickly and efficiently.
  • PowerShell Weekly for August 23, 2024

    Announcements!

    Blogs, Articles, and Posts

    • PDF Text to SQL Data: Using OpenAI's Structured Output with PSOpenAI \ Incredible! I just used PowerShell and OpenAI to import text from a PDF right into SQL Server 🚀 AI's usefulness is often debated but this is such a great use-case. I also see it being useful for automatically adding SharePoint document metadata and cleaning dirty data.
    • Unlock inline PowerShell capabilities to streamline Logic Apps workflows \ The new inline PowerShell action, now in preview, adds flexibility to Logic Apps by enabling users to embed PowerShell scripts directly into workflows. This feature unlocks new possibilities for complex integrations, and I'm excited to demonstrate its potential with a bank reconciliation workflow demo.
    • Find paired Azure region locations with Azure PowerShell \ In this article, you learn how to add a custom property to the Azure PowerShell Get-AzLocation cmdlet output to display the physical location for paired regions in Azure. This information isn't available by default but can help you understand the resiliency and redundancy of your Azure resources like geo-redundant storage (GRS) and other Azure services that rely on Azure Storage for replication.
    • Send email notifications about expiring Active Directory passwords with a PowerShell script \ Enforcing a policy for regular password changes is no longer recommended, as it can result in more helpdesk requests due to expired passwords, especially for VPN users, and may actually undermine security. However, timely notifications can help mitigate issues when password changes are necessary. Learn how to notify users with Group Policy or a PowerShell script.
    • Sort your local photos with Azure OpenAI and PowerShell! \ Quick short blogpost here today. I have created a PowerShell script that reads your local photos, uses Azure OpenAI to get the type/category they belong to and move them to a folder with that name. To accomplish this I am using the Azure OpenAI GPT4-o model. You can read here how you set up an … Continue reading Sort your local photos with Azure OpenAI and PowerShell!
    • PowerShell RegEx: Getting Started Guide \ PowerShell stands out as a versatile tool in scripting and automation, offering a wide array of functionalities to manage systems and process data. One PowerShell feature is the ability to use Regular Expressions (RegEx), a method for searching, matching, and manipulating strings based on specific patterns.
    • Custom Script Setting in SharePoint & OneDrive Removed \ Last week, we published a blog discussing Microsoft retiring SharePoint Add-Ins. In that blog, we briefly discussed how the Classic Mode for Custom Scripts has been affected by that change. The Custom Script setting in SharePoint and OneDrive has already been removed – the change took place in May 2024.   There is a new PowerShell command (DelayDenyAddAndCustomizePagesEnforcement) that will allow administrators to delay any changes until November of this year. Additionally, the NoScriptSite setting will be configured to True for all existing sites except for specific site templates.   How Will The Removal of Custom Script Settings Affect My Organization?
    • My first experience trying to use the PowerShell beta module for Microsoft 365 Backup \ I use Microsoft 365 Backup for my tenant; it's a simple way to back up Exchange, OneDrive, and SharePoint data to an Azure Subscription. There was no PowerShell module to query and configure things, but that has changed because the Beta module was released three days ago. In this blog post, I will describe my first experience trying to use the new module.
    • A PowerShell function to easily retry any code \ Performing retries to make your code more resilient is a common pattern. By leveraging a PowerShell ScriptBlock, we can create a function to avoid constantly rewriting the same retry logic again and again.

    ...continued in comments

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    3

    PowerShell Weekly for August 16, 2024

    Blogs, Articles, and Posts

    • Unlock BitLocker drive from Windows PE with a PowerSell script \ BitLocker can pose a significant challenge when multiple PCs need to be booted from an external drive for troubleshooting. The helpdesk must manually enter the 48-digit recovery password each time. However, this process can be automated by exporting the keys and using a script.
    • Handling the Too Many Retries Error and Dealing with Odd Numbers of Audit Events \ The AuditLog Query Graph API remains in beta status but cmdlets are now available in the Microsoft Graph PowerShell SDK. This led to some oddities in results when the number of audit events found by a search didn't match those reported by the Purview compliance portal. It all worked out in the end. In other news, the Set-MgRequestContext helped sort out some retry problems.
    • Using Export-Clixml and Import-Clixml for credentials in PowerShell scripts \ Using clear-text passwords in PowerShell scripts is, of course, a bad thing to do. But sometimes, you need to use credentials in a script to connect to a server, service, etc. In this blog post, I will show you how you can use Export/Import-Clixml to do that.
    • 10 Useful Tips for Customizing SharePoint List Fields with PnP PowerShell \ Recently, I was working on building a Power Apps application that takes data sources as a SharePoint list. To avoid creating SharePoint lists and manually adding different types of columns, I wrote a PowerShell script. While adding different types of columns to the SharePoint lists
    • Confirm Domain Join during OSD \ I’ve got a small group in my TS that double checks the domain join status, then exit with an error code if the OSD process didn’t join the domain properly. Basically, I’m using PowerShell to do a couple of lookups and writing the information to variables, which I then use to trigger an exit command.
    • Get Microsoft 365 Users’ Registered MFA Methods With PowerShell \ Nowadays, security is paramount and multifactor authentication (MFA) stands as a critical line of defense in protecting sensitive information within Microsoft 365 environments. As organizations increasingly adopt to configure MFA, it becomes essential for administrators to monitor the authentication methods registered by users.

    Projects, Scripts, and Modules

    • Introducing PSReminderLite \ For several years, I have been using a PowerShell module I wrote called MyTickle to help me manage my reminders and events. I spend my days at a PowerShell prompt, and I wanted an easy way to keep track of upcoming events.
    • Updated Media Tool available \ Back in 2023, I posted a Media Tool app (which uses PowerShell behind the scenes) to download Windows 10 or 11 media, for both x64 and ARM64 architectures.

    Books, Media, and Learning Resources

    • How I got my Windows PowerShell Terminal looking better \ This video starts with a Windows 11 23H2 installation with the default Windows PowerShell Terminal. I'm a bit of a fan of Oh-My-ZSH + PowerLevel10k for the Linux Desktops I built for work, so my goal was to have a similar looking prompt on Windows for my PowerShell terminal. I take you step by step through the process of improving the appearance of the terminal.
    • How to get info from your vCenter \ Hey everyone! In this video, I'm diving into a game-changing PowerShell one-liner that completely simplifies how I gather vCenter information. If you've ever been frustrated by manual scripts that take too much time and effort, this is the solution you've been waiting for!

    Community

    • TechMentor Highlights: Greg Altman, Mike Nelson, and James Petty Share PowerShell Wisdom \ In the latest episode of the PowerShell Podcast, we had the pleasure of interviewing Greg Altman, Mike Nelson, and James Petty. We spoke with three speakers at TechMentor in Redmond, including a special birthday guest. We covered topics such as imposter syndrome, details on the guests' talks, recommended books for starting and advancing in PowerShell, and a healthy helping of laughs throughout. Tune in for insightful conversations, valuable insights, and a few chuckles along the way!
    • Inside IT Automation l E08 l Steve Lee talks about PowerShell 7, AI, Project Mercury, DSC and more \ In this "Inside IT Automation" episode Heiko has a conversation with Steve Lee at the PSConfEU in Antwerp. They talk about the PowerShell 7, AI, Project Mercury PowerShell DSC and more. He also gives some insights into how the Microsoft PowerShell team works.

    Events

    • Build a Superfast Research Assistant using PowerShell and AI \ Join me for a hands-on session where we will build a superfast research assistant using PowerShell and AI. This powerful tool leverages the latest OpenAI models using my PowerShell module PSAI to search the web, gather information, and generate comprehensive research reports in seconds.
    • Coding Rock-Solid AI Agents: PowerShell Precision \ In this session, you'll learn how to harness the PSAI PowerShell module and the newly developed PSAIAgent to create AI agents with memory, contextual knowledge, and tool integration. We’ll dive into practical steps for building these advanced agents, ensuring each one is reliable, robust, and ready for real-world application.

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0

    PowerShell Weekly for August 9, 2024

    Blogs, Articles, and Posts

    • PowerShell: When to use Add-Type and New-Object ? \ In this blog post, I will discuss when you need to add classes with Add-Type and when you can provide classes with New-Object. I would say, let’s get started.
    • Managing DHCP Leases and Reservations with PowerShell \ In this tutorial, we'll explore how to manage DHCP leases and reservations using PowerShell. Effective lease and reservation management is crucial for maintaining a smooth-running network, preventing IP address conflicts, and ensuring that critical devices always receive the same IP address.
    • Windows device provisioning with Workspace ONE, part 2: Apps and policies \ In the first part, I got to the point where I could successfully get a device into a managed state, but that doesn’t mean the device is actually usable.
    • PowerShell: A Microsoft 365 Admin Roles Membership Report \ Manually reviewing the membership roster for each of the dozens of RBAC roles in a Microsft 365 tenant is quite
    • Creating a development Windows Sandbox using PowerShell and WinGet \ As I mentioned before, I like Windows Sandbox! However, since Windows 11 24H2, Windows Sandbox has been missing two things I often use: Notepad and Windows ISE. In this blog post, I will show you how to start Windows Sandbox and automatically install your preferred editors and tools using WinGet and PowerShell.
    • Understanding Get-EXORecipient \ This guide will provide you with the knowledge and tools you need to effectively manage your Office 365 mailbox using the Get-EXORecipient. Understanding Exchange Recipient Type Details When managing an Exchange environment, understanding the different types of recipients is crucial for effective administration. Exchange Online supports a variety of recipient types, each serving different purposes...

    Projects, Scripts, and Modules

    • Azure AD Incident Response PowerShell Module \ The Azure Active Directory Incident Response PowerShell module provides a number of tools, developed by the Azure Active Directory Product Group in conjunction with the Microsoft Detection and Response Team (DART), to assist in compromise response.

    Books, Media, and Learning Resources

    • Inside IT Automation l E07 \ Xavier Clinquart talks about PowerShell, the PoSh community and more.
    • Build a PowerShell Menu in 5 minutes \ In this video, we break down the concept of switch statements and how they can be utilized to create an interactive menu for users. We'll start with the basics of setting up a script, defining functions, and understanding how to handle user inputs in PowerShell.

    Community

    • Exploring Cybersecurity with PowerShell and John Hammond \ In this episode of the PowerShell Podcast, we sit down with renowned security researcher John Hammond. Recorded in person in Utah, we delve into John's unique insights on PowerShell and its role in cybersecurity. John shares his experiences with PowerShell attacks, discussing how it’s used in various malware and the importance of implementing security features like constrained language mode and script block logging. He highlights practical tips for making PowerShell environments more secure and emphasizes the need for continuous learning and experimenting within safe environments. We also explore how to transition into security-focused roles, with John providing valuable advice for those looking to combine their PowerShell skills with a career in cybersecurity.

    Fun

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0

    PowerShell Weekly for August 2, 2024

    Blogs, Articles, and Posts

    • The Maddening Side of the Microsoft Graph PowerShell SDK \ All software has unique quirks, and the foibles of the Microsoft Graph PowerShell SDK are well known. But it’s much harder when the underlying foundation contributes to the craziness as described in this article. Graph pagination works in a specific way and Microsoft tunes the Graph to deliver great performance by reducing the set of properties returned for objects. Both can cause concern for developers.
    • Microsoft Entra PowerShell module, successor to the Azure AD PowerShell module \ The Microsoft Entra PowerShell module is the successor to the Azure AD PowerShell module. It's designed to streamline management and automation for the Microsoft Entra product family, which includes the services formerly known as Azure Active Directory.
    • Using Switch in PowerShell \ Everyone uses If statements in their scripts: If this, then that. Or If not this, then that, multiple If, and even Elseif. But there is another option, Switch. In this blog post, I will show you how you can use Switch and make your scripts more readable in the process :)
    • Reading, Rotating, and Reporting on LAPS and BitLocker in Intune and Entra with PowerShell \ After the recent Crowdstrike Incident I've been thinking a lot about how to quickly perform LAPS and BitLocker actions against remote devices, and report on their use primarily via Microsoft Graph and Intune. I work and talk with a lot of folks in highly distributed environments (thinking of you, all of my EDU friends!).
    • Track File Activities in SharePoint Online Using PowerShell \ Users are given access to files in the organization for various purposes, such as project collaboration, documents sharing, and accessing necessary resources for their roles. Based on the permissions granted, users can perform actions on files and folders such as deletion, download, modifying, and more.
    • Find Your Most Frequently Used Terminal Commands \ Determine the most used commands in the terminal using Bash, Fish, PowerShell and Zsh with these simple one line commands.
    • OneDrive Pastejacking \ Phishing campaign exploits Microsoft OneDrive users with sophisticated social engineering, manipulating them into executing a malicious PowerShell script.

    Books, Media, and Learning Resources

    • TEC 2024 PowerShell & Conditional Access Workshops \ Don't miss your chance to meet and learn from your favorite Practical 365 Authors at TEC 2024. As a proud sponsor of TEC, we are offering BOGO discounts on exclusive pre-con workshops with authors Michel De Rooij, Jaap Wesselius, and more!

    Community

    • Unveiling the Power of Generative AI with Chrissy LeMaireq \ In this episode, Chrissy LeMaire discusses AI, her experience at PSConfEU, and her return to in-person speaking after a 5-year break. She provides an update on her book, "Generative AI for the IT Professional," and shares insights into leveraging AI beyond just conversing with ChatGPT. Chrissy also showcases a couple of interesting use cases involving AI.
    • Inside IT Automation l E06 l Bruno Buyck talks about PowerShell, PSConfEU and more \ In this "Inside IT Automation" episode Heiko has a conversation with Bruno Buyck at the PSConfEU in Antwerp. They talk about the PowerShell Conference, Bruno's PowerShell journey, PowerShell trainings, the Belgium PowerShell User Group and more.

    Fun

    Events

    • PowerShell Saturday NC \ Join us for PowerShell Saturday NC 2024, proudly brought to you by the Research Triangle PowerShell User Group! Mark your calendars for October 5th for this year’s gathering in Raleigh, NC.

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    Probably my first piracy experience (it was great)
  • I remember before scrambling they just put blocks that prevented you from going to certain channels. I somehow figured out if you ran the cable box through the VCR first and put it on channel 2 while the TV was still on 3, it would shift all the channels down one. Cinemax was channel 14, which our box just would not go to. But it would go to 13, so doing my little trick teenage me got to watch a lot of skinamax.

  • PowerShell Weekly for July 26, 2024

    Announcements!

    Blogs, Articles, and Posts

    • Extract LAPS Passwords and BitLocker Keys from Active Directory \ The below PowerShell can be used to extract LAPS Passwords and BitLocker Keys from Active Directory. This was written on Friday, July 19, 2024, due to the CrowdStrike Outage. If you choose to test this PowerShell, ensure that you update the argument for the SearchBase parameter to reflect your Active Directory domain.
    • The Maddening Side of the Microsoft Graph PowerShell SDK \ All software has unique quirks, and the foibles of the Microsoft Graph PowerShell SDK are well known. But it’s much harder when the underlying foundation contributes to the craziness as described in this article. Graph pagination works in a specific way and Microsoft tunes the Graph to deliver great performance by reducing the set of properties returned for objects. Both can cause concern for developers.
    • Find orphaned GPOs via PowerShell before migrating to Intune \ Many companies have already fully transitioned to Endpoint Management Intune and no longer need GPOs (Group Policy Objects). Others are in the preparatory stages. Therefore, I would like to provide some assistance for identifying orphaned Group Policy Objects. These can be relatively easily found and, if necessary, removed using PowerShell.
    • Convert RSA XML Private Key to PEM Format with PowerShell \ Recently I was working with a particular application that used certificates to secure communication. I wanted to put the certificates into Azure KeyVault. Azure KeyVault naturally allows you to store certificates. However, it only lets you upload certificates that are in PFX (PKCS#12) or CER (DER or BASE64 encoded).… keep reading
    • PowerShell script for automated remediation for CrowdStrike issue \ I have created a Powershell script for the Crowdstrike issue for some automation purposes. you can create a WinPE ISO File to boot into and remediate the crowdstrike issue. 3. Reboot: The system should boot normally. The script: This script is designed for use in an on-premises VMware environment.

    Projects, Scripts, and Modules

    • pwshBedrock v 0.9.1 \ pwshBedrock enables interfacing with Amazon Bedrock foundational models, supporting direct on-demand model calls via InvokeModel and the Converse API for supported models. It allows sending messages, retrieving responses, managing message context, displaying model information, and estimating token counts and costs. Use PowerShell to integrate generative AI applications with Amazon Bedrock.
    • ChocoLogParse v 1.0.0 \ Parses Chocolatey logs into easy to use objects.

    Books, Media, and Learning Resources

    • Diagnose Network Latency with PowerShell and SQLite [OC] \ In this video you’ll see how you can use PowerShell to check for network latency between multiple endpoints. You’ll learn how to record those results into a SQLite database with a just few commands, and no need to create any underlying infrastructure. Finally, you’ll see how you can view the data in PowerShell to help identify where and when you are experiencing network latency issues.

    Community

    • Interactive Shell Sessions and Language Models: Steven Bucher on Project Mercury \ In the latest episode of the PowerShell Podcast, we sit down with Microsoft PM Steven Bucher to dive into Project Mercury, a cutting-edge CLI tool designed to provide an interactive shell session for chatting with language models. Steven walks us through the functionalities of Project Mercury and how users can leverage this innovative tool. He also shares his approach to product management, reflecting on his growth in the role over the past couple of years. We explore the importance of empowering others and how it serves as a pivotal goal in Steven’s professional journey. Join us for an enlightening conversation that blends technical knowledge with leadership wisdom.
    • PowerShell Community Call - July 18th, 2024 \ The record of the July 18, 2024 PowerShell Community Call

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    Monitor Your Network with PowerShell [OC]
  • It took me longer than I would have liked, but I did finally get the next video uploaded. I hope you enjoy it as well.

    https://youtu.be/Do5Ve6M9mmU

  • PowerShell Weekly for July 19, 2024

    Blogs, Articles, and Posts

    • Upgrading the Teams and Groups Activity Report to 6.0 \ The Teams and Groups activity report is a popular script that helps administrators identify inactive teams and groups within a Microsoft 365 tenant. The script code has been developed over the years. The last version converted to Graph API requests to improve performance. This time, the upgrade is to use the Microsoft Graph PowerShell SDK to make the code easier to maintain.
    • Getting Started with PowerShell and the ServiceNow API \ Unlock the power of ServiceNow's API! Learn how to set up your developer account, create an OAuth app, and make your first API call using PowerShell.
    • Install AWS CloudShell in a VPC \ Recently, AWS announced the general availability of CloudShell VPC support. This feature enables the creation of a CloudShell environment within a dedicated VPC, establishing secure connections to other resources in the same subnet. The CloudShell inherits the VPC network configuration without any additional modification. In this article, I will introduce CloudShell, explain the new VPC support, and outline how to install AWS CloudShell in a VPC.
    • Restoring the NVIDIA Control Panel and Tools after the Appx Package Change \ With the move from the Standard driver model to the DCH (Declarative Componentized Hardware) driver model implemented from GRID 15.0 (Windows driver version 527.41) and above, the NVIDIA Control Panel app is now distributed through the Microsoft Store as an Appx Package.
    • PowerShell PSDrive \ This is sometimes forgotten, the easy way of accessing or checking network drives, certificates, registry, variables, etc. In this blog post, I will show you what a PSDrive does and some examples of its use.
    • Practical Graph: Using GitHub Copilot for Microsoft 365 PowerShell Development \ GitHub Copilot costs $10/month. At that price level, anyone working with PowerShell should try out the AI assistance to see if it helps. But will GitHub Copilot work well with Microsoft 365 PowerShell modules like Exchange Online and the Microsoft Graph PowerShell SDK. That's what we tested and report on here.

    Projects, Scripts, and Modules

    • UniGetUI (formerly WingetUI): GUI for winget, Chocolatey, and PowerShell Gallery \ UniGetUI, previously known as WingetUI, is a free GUI tool that lets you easily install and update software packages from various sources, such as Winget, Chocolatey, and PowerShell Gallery. Let me show you UniGetUI's features and how it can help you quickly set up a new computer with all the essential software.
    • A PowerShell Form Generator \ This article is an evolution of the previous, it regards not only the implementation of the package, but in particular a new paradigm with which the form objects are specified; the article is not intended to be an exhaustive explanation of the product, for this please refer to the attached documentation.

    Books, Media, and Learning Resources

    • PowerShell 101 \ Reluctant to learn PowerShell? This condensed version book targets the specific topics you need to know to be successful in a real-world production environment.
    • PSDates with Matthew Dowst \ Matthew Dowst talks about PSDates, a great module for working with [DateTime] in PowerShell

    Community

    • Emrys MacInally Explores PowerShell Error Handling and Module Versioning Strategies \ In this episode, we welcome back Emrys MacInally, following another successful year speaking at PSConf.EU. Emrys shares his experiences and highlights from the conference, shedding light on key discussions and takeaways. We dive deep into the importance of mental health within the PowerShell community, exploring how the community can support each other. Emrys provides insights into best practices for versioning PowerShell modules and delves into the nuances of error handling, explaining why developers should avoid using the 'throw' statement in scripts. Additionally, Emrys introduces his ErrorRecord module, which simplifies the process of creating error records, offering a practical solution for more efficient error management. Tune in for an enlightening conversation packed with valuable tips and expert advice for PowerShell enthusiasts.
    • Navigating Corporate Giants - Jeffrey Snover and the Making of PowerShell \ What if you had to fight against your company's culture to bring a revolutionary tool to life? Meet Jeffrey Snover, the Microsoft architect behind PowerShell, a command tool that transformed Windows system administration. Initially met with skepticism, Snover's idea faced resistance from a company that favored graphical interfaces. Snover's journey began with a simple mission: to make Windows as command-line

    Events

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    PowerShell Weekly for July 12, 2024
  • Projects, Scripts, and Modules

    • 365AutomatedLab and new companion module coming soon
      365AutomatedLab and new companion module coming soon I promise I haven’t forgotten about 365AutomatedLab, but I’ll be honest after Microsoft made the announcement of no more new Dev tenants it hurt a bit as I know how useful they are on learning and testing features and PowerShell without hurting your production environment.
    • How to Create SharePoint List & Add Columns Using PnP PowerShell?
      Recently, I developed one Power Apps application that needed a SharePoint list data source. Before running the application, the client must create the specific SharePoint list on their site. So, I wrote a Power Shell script to create the SharePoint list along columns to avoid mistakes when creating it manually.
    • PowerShell-Yayaml v0.5.0
      What's changed…
    • PSDates v1.0.4
      Tons of new stuff added including calculating sunrise and sunset time.

    Books, Media, and Learning Resources

    Community

    • Behind the Scenes at PSConf.EU: Harm Veenstra’s Experience and Insights
      In this episode of the PowerShell Podcast, we sit down with Microsoft MVP Harm Veenstra to discuss his exciting experiences at PSConf.EU, where he attended for the first time and embarked on a new journey into public speaking. Harm shares his thoughts on receiving the prestigious Microsoft MVP award and delves into his recent projects, including creating a TCP/UDP listener for testing firewall ports and using a Pi-hole to block ads on his home network. We also explore his perspectives on automation in the MSP world, the power of Microsoft Graph, and why he hasn’t yet adopted AI tools. Tune in for an engaging conversation filled with insights, tips, and highlights from PSConf.EU!
    • Write Code, Write Blogs: Lessons with Brock Bingham
      In our latest Powershell Podcast episode, we chat with Brock Bingham. We explore his transition from sysadmin to writer and his viewpoint of coding as creative problem-solving. Brock also shares insightful blogging tips and advises against the pitfalls of comparison. A must-listen for aspiring PowerShellers. (plz create a blog and share your learnings for future you)
  • PowerShell Weekly for July 12, 2024

    Announcements!

    • The Right Way to Replace the Remove-SPOExternalUser Cmdlet \ Microsoft says they will remove the Remove-SPOExternalUser cmdlet starting July 29. They recommend using Remove-AzureADUser as a replacement. It's a bad call because that cmdlet is part of a now-retired and soon to be deprecated module. Overall, recommendations like this make you think that Microsoft doesn’t know what’s happening across the whole of Microsoft 365. And you might be right.
    • PowerShell Elevation of Privilege Vulnerability \ This one affects all Windows versions all the way back to Windows Server 2012, so be sure to get the cumulative updates installed. CVE-2024-38047 and CVE-2024-38043 are also PowerShell Elevation of Privilege Vulnerabilities included in the cumulative patches this month.

    Blogs, Articles, and Posts

    • Audit Group Policy changes in the event log using XML queries and PowerShell \ Custom views in the Event Viewer allow you to filter the metadata of log entries based on various criteria. However, these filters do not assess the content of the log entry messages. To evaluate the log messages, you can extend filters using an XPath query. The examples below demonstrate how to audit Group Policy changes with XML queries, which you can further process with PowerShell.
    • Search and delete Copilot data in Microsoft 365 \ Managing and deleting unnecessary Copilot data from Microsoft 365 is essential for reducing security risks and ensuring compliance with data protection laws like GDPR and HIPAA. This blog post will guide you through the steps to search for and delete Copilot data using eDiscovery, Graph Explorer, and PowerShell. Following these steps can enhance data hygiene and safeguard your organization against potential data breaches and legal issues.
    • PowerShell: Measure Objects (Count, Average, Sum …) \ The Measure-Object cmdlet counts objects. But it can do even more. We can calculate the sum, the average and much more. In this blog post I show a few examples with Measure-Object.
    • Office Connectors Retirement for Teams \ In June, Microsoft retired Office Connectors for SharePoint Online and Microsoft 365 Groups. Starting on August 15, they're retiring connectors for Teams. The problem is finding out which teams and channels have configured connectors. That's when PowerShell comes in handy, as we prove with a script to report which teams have connectors.
    • Using Pop-Location and Push-Location in PowerShell \ At PSConfEU, somebody asked me if I used Pop-Location and Push-Location. Well, I know it's there, but no. :) In this blog post, I will show you how to use it and that it might come in handy!
    • ViperSoftX malware covertly runs PowerShell using AutoIT scripting \ The latest variants of the ViperSoftX info-stealing malware use the common language runtime (CLR) to load and execute PowerShell commands within AutoIt scripts to evade detection. [...]
    • Low Space on EFI (System) Partition – Clean up \ Hey folks, this seems like a topic that keeps coming up, despite the fact I had assumed everyone was creating large EFI volumes (984MB) by now, but I keep finding folks who have 100MB and run into issues.
    • Practical PowerShell: Error Handling \ Writing PowerShell scripts can be a fulfilling task. After all, you write something to assist with a task or procedure so you can focus on the result, not the task itself. But what if your script tries to run an action and is unsuccessful, for example, when a user the script attempts to manipulate is invalid or the signed in account has insufficient permissions to run a cmdlet? And do not forget the peculiarities of the online world, such as a network connection dropping or an authentication token expiring.
    • Mediator Pattern using PowerShell \ The Mediator Design Pattern centralizes communication, reducing dependencies & improving maintainability. Instead of direct interactions, objects use a mediator.

    Continued in the comments due to post character limits

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    1
    PowerShell: the object-oriented shell you didn’t know you needed | Chris Warrick | 29 April 2024
  • Nice write up, and a great primer for someone coming from the Linux/Bash world.

  • PowerShell Weekly for June 28, 2024

    Announcements!

    Blogs, Articles, and Posts

    • Adding Details of Authentication Methods to the Tenant Passwords and MFA Report \ V1.2 of the User Passwords and MFA report includes the names of authentication methods registered for user accounts. V1.3 expands the amount of detail reported for each method, such as the phone number used for SMS challenges, or the email address used for SSPR. It’s a small but important detail that’s useful to administrators. However, it also comes with a potential privacy issue, so the script must handle that too.
    • Leveraging OpenAI to Enhance Pull Request Management in Azure DevOps \ Our goal is to create an automation that significantly enhances the efficiency of our development process. A service hook is triggered when a new Pull Request is created in Azure DevOps, sending a webhook to an Azure Function. This function analyzes the request body, gets all commits in the Pull Request, and sends it to Open AI’s API, which generates a Pull Request message detailing all of the proposed changes from the commits and writes it back to the Azure DevOps Pull Request.
    • Create, configure, and delete system restore points with PowerShell, vssadmin.exe, and System Properties \ System restore points allow users to roll back Windows to an earlier state if problems arise. These points capture important system files, the registry, and drivers. In addition to using the System Properties applet, you can manage system restore points with PowerShell and vssadmin.exe.
    • How to Identify MFA Deployment Source in Microsoft 365 Using PowerShell \ Have you ever felt like managing multi-factor authentication (MFA) is more of a hurdle than a security measure? Constant MFA issues can be frustrating! Here are some common MFA issues; as you read, consider how you might address these challenges.
    • Connect to the Microsoft Entra PowerShell Module \ We all know that Microsoft deprecated the Azure AD PowerShell and MSOnline PowerShell modules. So, they advise us to migrate all the scripts to the MS Graph PowerShell. But finding the equivalent cmdlets and updating the scripts can be tough. Don’t worry! Microsoft heard our struggle!
    • Using Debug and Verbose parameters in PowerShell \ It's one of those things you forget, and you can get a lot more output when running scripts that will help you find out why things are not working as you expected. This small blog post will show you how to get more verbose and debug information.
    • PowerShell: Beyond the Prompt! \ Powershell often gets overshadowed by its scripting cousin, Bash, but just like Ruby, Powershell offers a depth that goes beyond the initial impression.

    Projects, Scripts, and Modules

    • PSLinux v 1.0.6 \ The RedHatSatelliteSearch PowerShell module provides functions to retrieve and manage data from a RedHat Satellite server. This module allows users to specify search filters to query and fetch information about hosts and other resources managed by the Satellite server.

    Books, Media, and Learning Resources

    • Counting Files with a Specific Extension Using PowerShell \ In this tutorial, we will guide you through the process of using PowerShell to count the total number of files with a specific extension within a directory and its subdirectories. This method is highly useful for system administrators and IT professionals who need to manage and analyze large volumes of files efficiently.

    Community

    • From NoWayShell to PowerShell: A Coding Transformation \ In this episode, host Andrew Pla converses with coding enthusiast Josh Hendricks (@joshooaj) about his transformative PowerShell journey - a pathway that led him from avoidance to adoration. The discussion delves into the intricacies of Joshua's PSPushover and MilestonePSTools projects, developing an understanding of their creation process. Additionally, Josh recounts his captivating experience of giving a talk on "Docs" at the prestigious PowerShell Summit. This riveting dialogue remarkably encapsulates a personal journey blending skepticism, discovery, and innovation at the heart of coding.

    Fun

    • TEC 2024 PowerShell Script-Off \ TEC 2024 in Dallas (October 1-2) will once again feature the TEC PowerShell Script-Off where coders attempt to come up with the best solutions for challenges set by the judges. The challenges are all Microsoft 365 scenarios (Exchange Online, Entra ID, Teams, and SharePoint Online), so there's nothing unknown about what we'll ask people to code. Come along to TEC 2024 and compete to be the best coder in town!

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0

    PowerShell Weekly for June 21, 2024

    Announcements!

    Blogs, Articles, and Posts

    • Using PowerShell to Post Channel Messages with Teams Workflows \ The incoming webhook connector is a popular method to post information to Teams channels, but Microsoft seems set on retiring the Office connectors. The Teams post to channel workflow when a webhook request is received seems like is a possible replacement, but it's not just a matter of switching mechanisms. Some PowerShell magic is needed to create a suitable adaptive card to post to the channel, which is exactly what we explain how to do here.
    • Working with Calendar Permissions using the Microsoft Graph PowerShell SDK \ The Set-MailboxFolderPermission cmdlet is usually used to set calendar permissions, including the permission for the default user to allow everyone in an organization to see each other’s calendars. But you can use cmdlets from the Microsoft Graph PowerShell SDK too. The Graph SDK cmdlets are faster, but not enough to warrant replacing the Exchange cmdlet in scripts. We explain why here.
    • Automate Azure DevOps Work Item Updates with Azure Functions and the Azure DevOps API \ I use Azure DevOps Boards for agile project management, allowing me to plan, track, and discuss automation and DevOps tasks. I also create reporting dashboards from the data within the work items. One such metric I report on is how much time we save when implementing a new automation.
    • How to check if an Azure Marketplace image is marked for deprecation \ How to check if an Azure Marketplace image is marked for deprecation.
    • How to Add or Remove Pinned Folders to Quick Access with PowerShell and GPO \ Windows File Explorer has a separate panel that displays a list of favorite folders and locations called Quick Access. Many users and administrators unjustly ignore this handy Windows tool
    • How to Split a String by Length in PowerShell? \ When you need to split a string by a specific length, PowerShell offers various methods to do it. This PowerShell tutorial explains various methods to split a string by length in PowerShell To split a string by length in PowerShell, you can use a loop with the Substring method to iteratively extract parts of the string
    • Using Measure-Command and Measure-Object in PowerShell \ Measuring is always a good idea for grasping things, such as how long it sometimes takes, how many objects there are in a specific directory, how much space something takes up on a hard drive, etc. In this blog post, I will show you how the Measure-Command and Measure-Object cmdlets work and how you can use them to your advantage.
    • How to disable per-user MFA using Microsoft Graph PowerShell \ Learn how to use Microsoft Graph PowerShell to disable per-user MFA in Microsoft Entra to support migration to Conditional Access.

    Projects, Scripts, and Modules

    • Version 1.9 of the Microsoft 365 Licensing Report \ The Microsoft 365 Licensing Report is a popular PowerShell script that's just been updated to V1.9 with a bunch of changes to highlight different aspects such as license costs for disabled user accounts and inactive user accounts. Copious use of some very dubious color choices makes the HTML report created by the script look very nice (if you're color blind) and the new version can generate an Excel worksheet.
    • PowerShellRun v0.7.0 \ In PowerShellRun v0.7.0, you can now add script blocks and script files as entries. If you are managing many PowerShell scripts, PowerShellRun will help you create a TUI script launcher.

    Books, Media, and Learning Resources

    • Monitor Your Network with PowerShell [OC] \ In this video you’ll see the full process I went through to create a script to monitor up and down times for my network.
    • Managed Identity With PowerShell And Azure Automation Accounts \ Join me in creating an automation account and using managed identity to connect to Azure, ExchangeOnline and Graph in this practical powershell example where we'll discuss how to connect, how to add permissions to a service principal and also a little bonus tip on how to get an access token for graph using Az and managed identity with the Get-AzAccessToken cmdlet.

    Community

    • Andrew Celebrates & Previews psconf.eu with Christian & Bjorn \ In this episode of the PowerShell Podcast, Andrew starts things off by celebrating his new Microsoft MVP. Then, we hear about all things psconf.eu and what to expect from Christian Ritter and Björn Sundling at PSConf EU. We hear some of the juicy details and key takeaways from their sessions. Then we get an update on some of their projects like PSClippy, AzDM, PSSecretScanner, and much more!

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    Monitor Your Network with PowerShell [OC]
  • Thanks! I'd love to hear your thoughts once you've watched it.

  • Monitor Your Network with PowerShell

    I recently created a YouTube channel where I do deep dives into creating automations with PowerShell. Instead of just publishing the solutions I take you through the entire development process.

    In this video I go through creating an uptime monitor for multiple IP addresses that can ping each IP every minute. I go through the evolution of trying Test-NetConnection, then giving up and using dotnet objects for asynchronous execution. And finally, how to put that all together and get your results.

    This is only my fourth video, so any and all feedback on it is welcome.

    5
    PowerShell Weekly for June 14, 2024
  • Community

    • PipeScript, Formatting, and Docker: An In-Depth Conversation with James Brundage
      In this episode of the PowerShell Podcast, we are joined by Microsoft MVP, former PowerShell team member, and module maker extraordinaire James Brundage. We hear about his experience at Microsoft Build, learn all docker and kubernetes while discussing his Rocker module, UserGroup updates, implicit interpretation in Pipescript, formatting and types, and so much more. Strap in because we go deep in this one.
    • Breaking Down ModuleFast and More with Justin Grote
      In this episode of the PowerShell Podcast, host Andrew Pla interviews Microsoft MVP and PowerShell aficionado Justin Grote. They delve into an issue in the Az.Accounts 3.0.0 module, with Justin offering insights and a workaround (use an earlier version of the module). Justin also discusses his innovative ModuleFast project, explaining its architecture and his approach to writing PowerShell scripts and modules. The conversation highlights Justin's passion for APIs and celebrates his contributions as an official PowerShell project contributor. Listeners get a glimpse into Justin's workflow working at a Managed Service Provider (MSP) and how he writes to much PowerShell. He offers valuable advice for those early in their careers. Additionally, Justin shares updates on his PowerHTML (1.2m downloads) project, which originated from a GitHub pull request, showcasing his continuous contributions to the PowerShell community.
    • PowerShell Community Call - May 16th, 2024
      Last month's community call with the PowerShell team.
  • PowerShell Weekly for June 14, 2024
  • Books, Media, and Learning Resources

  • PowerShell Weekly for June 14, 2024
  • Projects, Scripts, and Modules

    • passwordstate-management v 4.4.49
      Powershell Module for managing Password State
    • PowerQualys v 0.3.0
      Helper module for Qualys
    • WinTuner v 0.8.9
      Package and publish any apps from WinGet to Intune.
    • Interpreting Audit Records for Teams Meeting Recordings (Again)
      Three years ago, I wrote a script to analyze the audit records generated for Teams meeting recordings. Then things changed in terms of how the audit records were generated and how the Search-UnifiedAuditLog cmdlet returns audit search results. All of which meant that considerable work was needed to revamp (rewrite) the script. Maybe you need to check any script that uses the Search-UnifiedAuditLog cmdlet too?
    • tiPS v 1.3.10
      PowerShell tips delivered straight to your terminal.
  • PowerShell Weekly for June 14, 2024

    Enjoy an extra large edition, since I was sick last week and wasn't able to post.

    Blogs, Articles, and Posts

    • Use PowerShell to deploy and access GPT-4o in Azure OpenAI Service \ The Azure OpenAI Service is a specialized offering within the broader set of Azure Cognitive Services, providing access to OpenAI's language models. The service can be accessed through REST APIs, Python SDK, and a web-based interface, Azure OpenAI Studio. In this article, you will learn how to deploy and access the GPT-4o model in Azure with PowerShell.
    • Tracking Down User Logons with PowerShell and XPath \ When working with Windows event logs, especially the Security log, there might be instances where you need to extract specific information from events.
    • How to Leverage Reusable PS Remoting Sessions in your Scripts \ PS remoting lets you execute commands remotely. Learn how to create and manage persistent sessions in this short how-to covering creating and managing sessions.
    • Microsoft 365: How to set OneDrive Quotas with PowerShell \ In this blog post I will show you how to set OneDrive quotas with PowerShell. I’d say here we go! First, let’s connect to SharePoint Online.
    • Microsoft Purview Audit Search Graph API: Retrieve audit logs from Microsoft 365 with PowerShell \ Microsoft Purview integrates with Microsoft 365 applications such as Exchange, SharePoint, OneDrive, and Teams, providing comprehensive data governance, compliance, and protection capabilities across these platforms. One of the standout components of this suite is the Audit Search Graph API, which is currently in public preview. It allows developers and administrators retrieve detailed audit logs programmatically, providing deep insights into user activities across Microsoft services. In this blog, I will explore the full potential of the Microsoft Purview Audit Search Graph API and demonstrate how to use the API through both PowerShell and HTTP methods.
    • Understanding the Clean block in PowerShell \ PowerShell, a powerful scripting language and automation framework, provides features that enhance script development and execution. Among these features is the clean block, a lesser-known yet beneficial component in PowerShell functions. This article explores the clean block, its purpose, and how to use it effectively in PowerShell scripts.
    • To Splat or Not to Splat, That’s the Question \ Splatting is an optional PowerShell technique designed to make it easier to pass parameter values for cmdlets. It’s a personal choice whether to use splatting instead of passing values to individual parameters in the command line. Although the Microsoft Graph PowerShell SDK can be a little strange at times, you can use splatting with SDK cmdlets, even with some pretty complex parameters such as those used to filter objects.
    • Export Microsoft 365 License Cost Report Using PowerShell \ Microsoft 365 offers a vast array of plans and licenses, making it easy to find the perfect fit for your business needs. But with that flexibility comes complexity. Managing Microsoft 365 licenses and the cost spent on all those licenses can lead to confusion and can be a challenge.
    • Get SharePoint Files & Folders Created by External Users Using PowerShell \ External collaboration in SharePoint Online is essential for certain projects and tasks that might involve users from external organizations. External sharing in SharePoint Online and the ability to grant them access to our resources simplifies communication and bridges the collaboration gaps.
    • PowerShell Arrays \ You probably use it all the time in your scripts, but how do they work? In this blog post, I will show some simple examples of what you can do with them :)
    • Experimenting with PowerShell Batching and Parallel Execution \ PowerShell Parallel Processing is a mechanism to speed the processing of large quantities of data. In this example, we discuss how to use parallel batches to fetch Entra ID account information using mailbox data to drive information retrieval. Although this is only a demonstration of a technique, it might help those who must process thousands of mailboxes or accounts and would like to do so more quickly.

    Continued in the comments, due to size limits...

    3

    PowerShell Weekly for May 31, 2024

    Announcements!

    Blogs, Articles, and Posts

    • PowerShell Tool-Building 101: Building a Computer Inventory Report \ Join me on an exciting journey as we build a powerful PowerShell tool for generating computer inventory reports! From CSV files to CIM queries and error handling, we'll walk you through each step as we go. Let's script our way to success!
    • Deploy Windows 11 with the free PowerShell framework OSDCloud \ OSDCloud is a free PowerShell framework for deploying Windows 10 and Windows 11. The tool provides simple methods for adding drivers and configuring settings in an image. After booting from a customized WinPE, either the OSDCloudGUI or an automated script initiates the installation.
    • Practical PowerShell Series: Part 4 Branching \ In my previous article in the Practical PowerShell series, I discussed looping as part of flow control. In this article, I cover another essential part of flow control: branching. Branching defines multiple paths for your code to follow, depending on conditions.
    • Querying DNS Records with PowerShell \ In this blog post explore how you can use PowerShell to query DNS records.
    • A simple PowerShell script template I use when creating new scripts \ I spin up new PowerShell scripts all the time, whether just for quickly experimenting and testing things out, or for projects that I know will be around for a while. There’s a few basic things that I like all my scripts to have, so I’ve created a simple template that I use when creating new scripts.
    • Working with Teams Messaging Using the Microsoft Graph PowerShell SDK \ This article describes how to use the Microsoft Graph PowerShell SDK to interact with Teams messaging to create new one-to-one and group chats and post messages to chats and channel conversations.

    Projects, Scripts, and Modules

    Books, Media, and Learning Resources

    • PowerShell Scripting and Toolmaking \ Several years ago Don Jones and I wrote what we hoped would be the definitive book on PowerShell scripting and toolmaking. The book takes all off our years of experience, not only from writing PowerShell code, to teaching and conference presentations where we hear first hand what people struggle with.
    • Frontend PowerShell with Google Forms: Part 2 Replying with Gmail \ [OC] Learn how to integrate Gmail into your scripts to send automated email responses. You’ll also learn how to make your automations more flexible by accounting for things like hitting grid limits in Google Sheets.

    Community

    • Inside IT Automation | E04 | Erwin van Hunen talks about PnP PowerShell, MS Graph, music and more \ Erwin is the 'Father' of PnP PowerShell, an open source PowerShell module that is used millions of times everyday worldwide to perform automated tasks towards Office 365 and SharePoint. He is also a Microsoft MVP and well-known public speaker, and technology evangelist. As Chief Technolgy Officer he shapped products and services at Valo, Staffbase and Rencore. Currently he is Head of Product at MondayCoffee.
    • PowerShell on Linux and Beyond with Steven Judd \ In this celebration-themed episode of the PowerShell Podcast, Steven Judd makes his long-awaited return. We announce the first PowerShell Podcast MVP winner. We share tips about regex and URL encoding and dive deep into PowerShell on Linux, CloudShell, and becoming a lifelong learner. All this and more!

    Events

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0

    PowerShell Weekly for May 24, 2024

    Blogs, Articles, and Posts

    • Upload a PowerShell Script to Intune (With PowerShell) From Scratch \ Automate deploying PowerShell scripts to Intune devices with Azure app registration, Graph API, and more in this step-by-step tutorial.
    • Remove store apps from a Windows image \ In professional environments, most store apps delivered with Windows are of little value, prompting admins to remove them from the image before deployment. However, you should avoid indiscriminately deleting them, as some system-relevant apps may be among them. PowerShell can be used to remove the crapware selectively.
    • Find the Teams Meetings Attended by a Specific User Using PowerShell \ Ever wondered how much time your team members spend in Teams meetings? Or perhaps you’re tasked with analyzing an individual’s meeting activity within Teams. Look no further! In this blog, we’ll explore the methods to obtain user-specific Teams meeting reports. Here, we’ll also introduce a crafted PowerShell script that simplifies the process…
    • Parameters for PowerShell Scripts and Functions \ Using parameters for your Scripts and Functions is very powerful. You don't have to hardcode things in them, making running them from a command line easier. This blog post will show you the parameters I use in most of my scripts and how they work.
    • Use the Azure OpenAI GPT-4o (all-in-one-model) with PowerShell! \ On May 13th GPT-4o was released in preview in the Azure OpenAI Playground. No API access, only accessible in the browser. Today I was going into the playground to test something with the GPT-4o model, but could not find it. What had happened? Turnes out it suddenly was in GA and available to choose under … Continue reading Use the Azure OpenAI GPT-4o (all-in-one-model) with PowerShell!
    • Automating PowerShell tasks with Container App Jobs \ I previously wrote about Automating maintenance tasks with Azure Functions and PowerShell. That combo has been my go-to solution for many automation tasks.
    • A Powershell GUI using DotNet Windows.Forms to start AWS Lambda Functions and display their output \ A Powershell GUI using DotNet Windows.Forms to start AWS Lambda Functions and display their output - powershell-gui-aws-lambda-start-functions.ps1

    Projects, Scripts, and Modules

    • WinGet.CommandNotFound \ We are pleased to announce the release of WinGet.CommandNotFound! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions.
    • Keep Microsoft Teams status Available instead of away using PowerShell \ It is one of the things I hear my colleagues, and even my girlfriend, mention regularly... Why does Microsoft Teams think I'm away while I'm not / My PC isn't locked yet... I read a few solutions, setting your status duration to a date in the future, etc... Didn't work :( What does work is running my simple PowerShell scripts, which I will show you in this blog post :)
    • ps-arch-wsl v 0.1.1 \ Install Arch Linux on Windows the easy way.
    • Posh-ACME v 4.23.1 \ ACME protocol client for obtaining certificates using Let's Encrypt (or other ACME compliant CA)
    • dbatools.ai v 1.0 \ dbatools.ai is a copilot for SQL Server databases

    Books, Media, and Learning Resources

    Community

    • PowerShell on the road at MMS-MOA with Sven De Groote and Chris Thomas \ On this episode of the PowerShell Podcast, Andrew is back on the road, attending the MMS 2024 at MOA conference. Andrew catches up with Sven De Groote and Chris Thomas. Andrew and Sven take a dive into the PSAppDeployToolkit. Later in the episode, Andrew and Chris chat about PSADT, Chris’ PowerShell journey, his talk at MMS-MOA, and more.

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    PowerShell Weekly for May 17, 2024
  • Thanks! I'm glad to hear you are finding it useful.

  • PowerShell Weekly for May 17, 2024

    Announcements!

    Blogs, Articles, and Posts

    • PowerShell Testing Mastery with Data-Driven Pester \ I’ve been using Pester for a long time off and on. I’ve always been obsessed with ensuring reliability in my PowerShell code. After writing the Pester Book and mentioning some of the methodologies I used with Pester v4 I’ll present in this blog post, I’ve since learned Pester v5 makes my work so much easier.
    • PowerShell Basics: Navigating CSV Files \ In this tutorial, we're diving into the essentials of handling CSV files using PowerShell, covering a variety of scenarios you might encounter in the real world. This guide will help sysadmins and IT professionals manage data effectively, demonstrating the power and flexibility of PowerShell in working with different types of CSV files.
    • Hyper-V: Enabling VM Resource Metering \ It is a good idea to monitor your Hyper-V VMs to get an overview of where resources are being consumed.
    • Check Windows 11 Hardware Readiness with PowerShell Script \ In this article, we’ll look at how to use the official Microsoft HardwareReadiness.ps1 PowerShell script to perform a bulk Windows 11 hardware compatibility check on domain computers.
    • Deprecated PowerShell Modules and Azure AD Graph retirement \ You created a script or function a while back that people in the company use a lot, and suddenly... They come to you telling you that it doesn't work anymore. :( The module you used has become deprecated, cmdlets don't all work anymore, etc. In this blog post, I will show the three most prominent modules that have become deprecated and where you can find good information about the successor to adjust your scripts.
    • Configure ‘Allow logon locally’ automatically using PowerShell and Microsoft Intune \ I know Microsoft Intune has the ability to configure this particular user rights assignment natively already. At time of writing, the new security baseline for Windows 11 23H2 in Intune configure this as well, restricting local logons to the built-in groups: Users and Administrators. This solution does something else. This solution grabs the currently logged on user and configures the ‘Allow logon locally‘ policy to ONLY allow this very user as well as Administrators to be able to log on locally.

    Projects, Scripts, and Modules

    • Detecting Windows Terminal with PowerShell \ In the evolving landscape of software development and system administration, understanding your environment is essential for ensuring that scripts and commands run as expected. One useful PowerShell function that helps identify whether a script is running within Windows Terminal is my Test-IsWindowsTerminal function. This function is valuable for developers and system administrators who must tailor their scripts based on the terminal environment.
    • PowerShell Script to Check Active Directory Member Servers for Automatic Services’ Status \ I’ve been caught by an automatic service not starting after system reboots from things like patching.
    • Find your IPv4 and IPv6 addresses \ A PowerShell function to display the current IPv4 and IPv6 addresses of the machine. Useful to include in $PROFILE

    Community

    • For the love of PowerShell and Curling with Frank Lesniak \ In this special MMSMOA episode of the PowerShell Podcast, Andrew is joined by Frank Lesniak. We touch base after PowerShell Summit, hear about tracking airplanes with ADS-B and raspberry pi's. Frank talks about classes and how they almost caused him to fall out of love with PowerShell. We also recount what most be the most brutal display of athleticism, curling.

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    2

    PowerShell Weekly for May 10, 2024

    Announcements!

    • Windows Terminal Preview 1.21 Release \ Windows Terminal is back with another preview release! Windows Terminal Preview 1.21 introduces long-awaited features like Buffer Restore and fontfall back as well as new experimental features like Scratchpad and the ability to load up an image as a texture. There’s also a LOT MORE stuff so check out the rest of this blog post to learn more!

    Blogs, Articles, and Posts

    • Upload a file to Connectwise and Attach it to a Service Ticket with PowerShell \ I have recently been automating a lot within Connectwise PSA. One of the items I set out to do is to upload a file and attach it to a service ticket. This led me to the following article, but after doing some testing, I found that some file types were not properly rendering on the Connectwise side, making me believe there was something wrong with the encoding.
    • More Microsoft Graph PowerShell SDK Problems \ Some problems emerged in V2.17 and V2.18 of the Microsoft Graph PowerShell SDK. In one case, Microsoft changed cmdlet names. In another, it's an identity issue caused by incompatible assemblies. In both cases, questions have to be asked about the level of testing done by Microsoft before they release a new module. Bugs do happen, but testing should catch the obvious problems.
    • Using $using in PowerShell for local variables in remote sessions \ When running scripts that connect to remote systems using Invoke-Command, you can use your local variables in the remote session which makes things a lot easier. In this blog post, I will show you how :)
    • Read, Modify, and Parse JSON File (Object) with PowerShell \ JSON is a popular text-based format for representing and transmitting structured data based on JavaScript object syntax. There are two cmdlets in PowerShell that allow you to work with the…
    • Report SharePoint Online Files Using the Microsoft Graph PowerShell SDK \ This article describes creating a SharePoint Online files report using the Microsoft Graph PowerShell SDK. While keeping digital debris online might have been unimportant in the past, it's something that can wreak havoc in the era of generative AI when tools like Copilot for Microsoft 365 are happy to consume obsolete and inaccurate material.
    • Get-FileHash of 100G files \ An interesting thread on reading file hashes.
    • Finding the specific day of the month with PowerShell \ Advanced usage of PowerShell's Get-Date function for finding dates

    Projects, Scripts, and Modules

    Books, Media, and Learning Resources

    Community

    Fun

    • PixelPoSH \ PixelPoSH is a PowerShell module that generates customizable graphical backgrounds using System.Drawing in .NET. This tool allows users to create images with various graphical patterns like bubbles, concentric circles, stripes, and squares. It's perfect for quickly generating backgrounds for desktops, websites, or any project that could use a splash of color and creativity.

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    PowerShell Weekly for May 3, 2024
  • Thanks! I'm glad to hear others are finding it useful.

  • PowerShell Weekly for May 3, 2024

    Blogs, Articles, and Posts

    • Encrypting secrets locally \ Keeping security folks happy (or less upset which is the best we can hope for)
    • Partition Windows drive in WinPE using PowerShell \ An essential step towards automating the Windows setup process is replacing the system drive's interactive partitioning with a script. Microsoft's examples for this purpose rely on batch files and Diskpart. However, installing PowerShell in Windows PE allows for a much more elegant solution.
    • Your Go-To PowerShell Template for HTTP-Triggered Azure Functions \ Struggling with messy Azure Functions PowerShell code? Learn how to adapt your scripts for serverless, validate HTTP parameters, throw descriptive errors, and bind PowerShell output to HTTP responses for robust web-friendly functions.
    • Removing Outlook Add-ins From Mailboxes with PowerShell \ The Share to Teams Outlook add-in posts an email to a Teams chat or channel conversation. I was asked how to disable the add-in for some mailboxes. Here's how to do the job using PowerShell to find a set of target mailboxes and then turn off Send to Teams for each mailbox.
    • New PowerShell Command Parameters in ConfigMgr 2403 \ Here is a list of the Configuration Manager (SCCM) PowerShell module changes in version 2403. So far only the Save-CMSoftwareUpdate changes has been documented, but I have found a few more changes when poking around in the 2403 PowerShell module. Here is a list of the Configuration Manager (SCCM) PowerShell module changes in version 2403.
    • The only PowerShell Command you will ever need to find out who did what in Active Directory \ While the title of this blog may be a bit exaggeration, the command I'm trying to show here does it's best to deliver on the promise. What you're about to witness here is something I've worked on for a while now, and it meets my basic needs. If you don't have SIEM product or products that monitor who does what in Active Directory this command makes it very easy, even for people who don't have much experience in reading Event Logs. If you'd like to learn about working with Windows Event Logs here's a great article I wrote recently - PowerShell - Everything you wanted to know about Event Logs and then some.
    • PowerShell: the object-oriented shell you didn’t know you needed \ PowerShell is an interactive shell and scripting language from Microsoft. It’s object-oriented — and that’s not just a buzzword, that’s a big difference to how the standard Unix shells work. And it is actually usable as an interactive shell.

    Projects, Scripts, and Modules

    • Report on Non-Compliant Intune devices \ I received a question on the Microsoft Tech Community forum regarding creating a report about non-compliant Intune devices. The report should give insight into what device has what issue with which setting; the person asking the question was already working on a Microsoft Graph script but couldn't find a suitable way. In this blog post, I will show how to create this report. There are other scripts out there, but I always like a challenge (And Microsoft Graph can be quite a challenge sometimes ;) )
    • PSMake \ PSMake is an all-in-one project management and lifecycle toolset for PowerShell.
    • 365Automatedlab V2.10.1 Released! \ I know I said every 2 weeks, but I lied. I wanted to get this out! It is now possible to add a manager when creating a new user. Also added a feature so that when you use the parameter -UseDevelope…

    Books, Media, and Learning Resources

    • Pick Up The PowerShell Practice Primer \ A number of years ago, I published book on Leanpub, designed to help you teach yourself PowerShell. After you get through the first Month of Lunches book, what do you do next? The best way to learn PowerShell is to do it. But it might be challending trying to figure out what to do. I...
    • Practical PowerShell: Flow Control \ “Control, Control, You Must Learn Control.” I rarely quote Yoda’s wisdom in articles, but this is an exception. After discussing advanced functions in the second Practical PowerShell article, the other important scripting skill to master is using the flow control cmdlets. These cmdlets are not just theoretical concepts; they are practical assets that can significantly enhance your PowerShell scripts.

    Community

    • The PowerShell & Global DevOps Summit 2024 Bar session 4 \ In this episode, we have 2 interviews: Danny Stutz and Carrie Cargil. We start things off chatting with Danny and hearing about his first time speaking at Summit and how his career has gone. He shares some of his keys to success and he is someone to keep your eye out for.
    • Inside IT Automation E03 \ Matthew Dowst talks about PowerShell, Python, writing books and more

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    2

    PowerShell Weekly for April 26, 2024

    Blogs, Articles, and Posts

    • Removing Licenses from Entra ID Accounts When a Replacement License Exists \ License management is a core competence for Microsoft 365 tenant administrators. This article explains how to use PowerShell to remove licenses from accounts when an equivalent service plan is available from another license. It's the kind of fix-up operation that tenant administrators need to do on an ongoing basis.
    • Sending Urgent Teams Chats with PowerShell \ A reader asked if it is possible to script sending chat messages. In this article, we explore how to compose and send Teams urgent messages to a set of recipients using Microsoft Graph PowerShell SDK cmdlets. The conversation with each recipient is a one-to-one chat that Teams either creates from scratch or reuses (if a suitable one-on-one chat exists).
    • Azure AD: How to set Maximum Devices per User \ The default value of the maximum number of devices per user in Azure AD is 50 devices. That is a lot. If you want to restrict the number of devices then you came to the right place.
    • Configuring NTFS Permissions using PowerShell \ Here are some quick examples on configuring NTFS permissions using PowerShell. The first example is using the takeown.exe and icacls.exe commands driven by PowerShell, and the second example is using the takeown.exe and native Get-Acl and Set-Acl PowerShell cmdlets. Credits: Thanks to Gary Blok for showing me the Get-Acl and Set-Acl PowerShell cmdlets.
    • How to Automatically Update Apps in Intune with Dynamic Win32 App Deployment   \ Greetings, fellow IT admins! Repackaging setup files and editing your Win32 app again can be tedious and time-consuming. Thankfully, I bring you good news! There is a way to deploy a Win32 app and have it always install the latest version of the app on the computer.
    • How to Read Outlook Emails with PowerShell \ Let’s look at how to open, read, and parse emails in a connected Outlook mailbox from within a PowerShell script. Outlook MAPI allows you to directly access the mailbox, list…
    • Azure DevOps Workload Identity & Terraform Authentication \ Azure DevOps supports Workload Identity federation (powered by OpenID Connect) to authenticate to Azure and Azure DevOps from your pipelines for deploying Terraform configurations. Workload Identity federation To follow along with this tutorial, you will need: To follow along with more code examples, check out this GitHub repository:JeffBrownTech/azure-devops-terraform-oidc-examples What is Workload Identity federation?
    • The secret to PowerShell remoting over ssh \ The magic line of configuration to enable PowerShell remoting over ssh.

    Projects, Scripts, and Modules

    • Using .NET With PowerShell \ This goal of this post is to explore some .NET classes that may be useful to sysadmins and PowerShell devs without .NET (C#, etc.) experience, with a bit of a deeper dive into some concepts when warranted.
    • tiPS v 1.3.3 \ PowerShell tips delivered straight to your terminal. Now with author name for those who submit their own tips.

    Books, Media, and Learning Resources

    Community

    • The PowerShell and DevOps Global Summit 2024 Bar session 3 \ In this episode of the PowerShell Podcast, we continue with our "bar sessions" from the PowerShell and DevOps Global Summit. We gain interesting insights into PowerShell, the Summit, career, and more. Our guests include Chris Masters, Joe Gasper, Rob Derickson, Chris Nguyen, Fred Weinmann, Merill Fernando, Clayton Tyger, Mike F. Robbins, Sean Wheeler, Prasidh Arora, and Danny Maertens.

    Events

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0

    PowerShell Weekly for April 19, 2024

    Blogs, Articles, and Posts

    • MarkdownToHtml Documentation \ Create static websites from Markdown sources with PowerShell fast and easy.
    • Cloud operations for Windows Server through Azure Arc \ Running Windows Server on-premises or at the edge? Learn how you can leverage Azure management solutions for cloud operations for Windows Server through Azure Arc.
    • Removing Licenses from Entra ID Accounts When a Replacement License Exists \ License management is a core competence for Microsoft 365 tenant administrators. This article explains how to use PowerShell to remove licenses from accounts when an equivalent service plan is available from another license. It's the kind of fix-up operation that tenant administrators need to do on an ongoing basis.
    • Restrict User Access to Azure AD PowerShell and MS Graph Explorer \ We all know that any user in Microsoft Entra ID can read the users’ details and directory information using Entra ID portal, PowerShell, and Graph API Explorer. Although restricted from making changes, non-admins can still explore user information, group details, device details, etc.
    • Report from which PowerShell module the cmdlets are from \ We all encountered this: you get a script or function that uses a certain cmdlet... And it fails because the cmdlet is not recognized :( But which module should you install to get the script working? Or does your script install or import all the required modules? In this blog post, I will show you how to check from which module(s) the cmdlet(s) originate and if they are present on your system or if you should install them.

    Projects, Scripts, and Modules

    • AzOps v 2.6.2 \ Integrated CI/CD Solution for Microsoft Azure.
    • Okta.PowerShell v 1.0.1 \ Okta.PowerShell - the PowerShell module for Okta Management
    • Active Directory Replication Summary to your Email or Microsoft Teams \ Active Directory replication is a critical process that ensures the consistent and up-to-date state of directory information across all domain controllers in a domain. Monitoring this process is important as it helps identify any issues that may arise and resolve them quickly. One way to monitor Active Directory replication is by using the Repadmin command-line tool. Repadmin provides a wealth of information about the replication status and health of a domain. However, manually checking the Repadmin output can be time-consuming and tedious, and running it manually every 30 minutes just to check if everything is great doesn't seem like a great idea. While PowerShell has its own commands around replication I've not found something as fast and reliable as repadmin /replsummary.
    • PowerShell Script – KB5025885: How to manage the Windows Boot Manager revocations for Secure Boot changes associated with CVE-2023-24932 \ Required Reading: KB5025885: How to manage the Windows Boot Manager revocations for Secure Boot changes associated with CVE-2023-24932 – Microsoft Support Related: Words of Warning Once you’ve applied the mitigations outlined in the KB, the device is difficult to work with when it comes to boot media / reimaging.
    • 2.9.0 Released and Big Update \ I know it’s been a month, all good though! I think I may start doing monthly release, what are your thoughts? I was going to do every 2 weeks, but not sure if that is too quick. Big update as I’m s…

    Community

    • PowerShell + DevOps Global Summit 2024 reflections \ I’m sitting in the airport waiting for my return flight after what has been an awesome week at the PowerShell + DevOps Global Summit 2024, North American edition in Bellevue, Washington. There’s a whirlwind of things going through my mind, so I thought I would try and capture some of them here.
    • The PowerShell & DevOps Global Summit 2024 Bar Session 2 \ In this special episode of the PowerShell Podcast, we chat with people at the PowerShell Summit. It's PowerShell after dark, the bar sessions. We talk about the OnRamp program, its scholarship program, and more. Then, we chat with Ambre Herron, Austin Hollett, Cory Knox, Ryan Richter, Vanda Paladino, and Tyson O'keefe.
    • The Practical 365 Podcast S4 E17 \ It took a little over 6 and a half years since the last episode of The UC Architects podcast, but I was finally reunited with Steve Goodman. This time it was to join him and Paul Robichaux to record an episode of the Practical 365 podcast, and talk about the new Practical PowerShell series on Practical365.com.
    • PowerShell Community Heros – PowerShell.org \ The DevOps Collective has decided to establish a set of three awards to recognize and honor the contributions of community members who have gone above and beyond in their efforts to support and promote the PowerShell community. The awards will be presented at the annual PowerShell + DevOps Global Summit. It is hoped that these awards will motivate and inspire members of the PowerShell community.

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    PuTTY vulnerability vuln-p521-bias
  • If I understand correctly, the signatures generated by PuTTY aren’t perfectly random, so if someone got a hold of a bunch of keys from a server, they could figure out the pattern. It takes about 60 keys. This affects not just PuTTY, but also FileZilla, WinSCP, TortoiseGit, and TortoiseSVN.

    In other words if you have NIST P-521 keys, or any others using 521-bit ECDSA, you should revoke them and generate new key pairs. After you update your software.

  • PowerShell Weekly for April 12, 2024

    Blogs, Articles, and Posts

    • How to Retrieve Loop Workspaces Data with PowerShell \ A previous attempt to write a script to report all Loop workspaces in a tenant was flawed because it only retrieved the first 200 workspaces. I hadn't realized that the Get-SPOContainer cmdlet supported an odd form of pagination to retrieve workspace data. In any case, I figured out how to page top find all available workspaces and updated the script. It's just another example of oddness in the SharePoint Online PowerShell module
    • Modifying the Teams Tenant Federation Configuration with PowerShell \ A new parameter for the Set-CsTenantFederationConfiguration cmdlet made me look at the Teams tenant federation configuration again to improve how a script works. Instead of taking all the domains guest accounts came from and adding them to the configuration, I created a function to check if the tenant uses Microsoft 365. If it does, we add the tenant to the allow list in the tenant federation configuration. If not, we ignore the domain.
    • Automate on-premises Windows Server from the cloud using Azure Arc \ Running Windows Server on-premises or at the edge? Learn how you can leverage Azure automation, PowerShell, Windows commands, and Azure management solutions for Windows Server on-premises. At the Windows Server Summit 2024, I had the chance to deliver a session with Ryan Willis Product Manager for Azure Arc and we went through different automation options …
    • PowerShell: Waiting for jobs to complete with Wait-Job \ The cmdlet Wait-Job waits until one or all of the PowerShell jobs running in the session are in a terminating state. In this blog post I will show you an example
    • PowerShell data/reference types for variables \ When you store data in a variable, PowerShell can store it how you want it to be if you use the correct data type. This blog post will show you how that works and which data types I mostly use for my scripts.

    Projects, Scripts, and Modules

    • PowerShellRun \ PowerShellRun is a PowerShell module that lets you fuzzy search applications, utilities and functions you define and launch them with ease. It is a customizable launcher app on the PowerShell terminal.
    • Rocker v 0.1.1 \ Rock Docker with PowerShell
    • PSPlex v 1.0.16 \ A PowerShell module to aid Plex server management.
    • TheDashboard v 0.0.24 \ TheDashboard is a module that allows you to create a dashboard for your HTML reports

    Community

    • From Blogging to DevOps with Jeff Brown Tech \ In this episode of the PowerShell Podcast, we are thrilled to host Jeff Brown, a seasoned educator and PowerShell enthusiast. Jeff takes us on a journey spanning nearly two decades of his prolific blog writing, revealing how it shaped his career trajectory. Delving into the importance of certifications, Jeff emphasizes their role as a structured pathway for acquiring new skills and advancing in the tech industry. We explore Jeff's transition from Azure Engineer to the dynamic realm of DevOps, uncovering valuable insights along the way. Join us as Jeff shares his wealth of experience, offering invaluable advice and perspectives for aspiring IT professionals and seasoned experts alike.
    • The PowerShell & DevOps Global Summit 2024 Bar Session 1 \ In this special episode of the PowerShell Podcast, we chat with people at the PowerShell Summit. James Petty gives us a preview of the week ahead at PowerShell Summit. We also talk about the OnRamp program, its scholarship program, and more. Then, we chat with Ben Reader, Frank Lesniack, James Ruskin, Kevin Cefalu, and Steve Bucher.

    Fun

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0

    PowerShell Weekly for April 5, 2024

    Announcements!

    Blogs, Articles, and Posts

    • Exchange Online: Message Tracking with PowerShell \ Message tracking in Exchange Online can be performed graphically as well as in PowerShell. In this post I will show how to track messages with PowerShell.
    • Reduce your attack surface by disabling NetBIOS using PowerShell and Microsoft Intune \ Introduction If you are working with device management and IT security in general, you have probably heard about the recommendation to disable the legacy protocol NetBIOS in Windows. If this is news to you, there’s some interesting reading for you in this article: Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay, Sub-technique T1557.001 – Enterprise | MITRE ATT&CK NOTE: Before disabling anything, make sure you do your due diligence and monitor your environment for NetBIOS traffic, so you don’t accidently break stuff!
    • Installing and Using PowerShell Copilot \ PowerShell Copilot is a community-developed module that extends the capabilities of PowerShell by integrating with the GPT-4 language model. This innovative tool is designed to assist users in generating code quickly and efficiently, leveraging the vast repository of code available on GitHub.
    • Porting PowerShell to FreeBSD, first working poc \ For background, there was a previous attempt to bring PowerShell to FreeBSD, but it seems it got stuck somewhere
    • All About Pagination with the Graph and the Graph PowerShell SDK \ When you're new to Graph API requests, you might not know pagination and end up retrieving less data from queries than is available. In this article, we explain how to use pagination to retrieve data using Graph queries and SDK cmdlets.
    • Getting the Timezone in Windows Using a Simple PowerShell Command \ Learn how to retrieve the timezone information in Windows using PowerShell. The Get-TimeZone command allows you to access various properties related to the timezone, such as the timezone ID, display name, and standard time offset. Follow the simple steps provided in this blog post to retrieve the timezone information for your Windows system. This information can be useful for troubleshooting, system administration, or scripting tasks. Give the Get-TimeZone command in PowerShell a try next time you need to retrieve the timezone in Windows.

    Projects, Scripts, and Modules

    • Material from my RTPSUG presentation \ Material from my RTPSUG presentation on writing better PowerShell code - demo.ps1
    • PSTableauREST v 0.6.4 \ This PowerShell module facilitates working with Tableau REST API for automation tasks. Most functions are implemented as wrappers for the corresponding API calls.
    • OnePowerShellProfile v 1.0.12 \ Generates a duplicate PowerShell profile for each installed PS editions (i.e. Desktop, ISE, Core)

    Books, Media, and Learning Resources

    Community

    • Unveiling PowerShell’s Past: An Interview with Jeffrey Snover \ In this highly anticipated episode of the PowerShell Podcast, we sit down with the legendary Jeffrey Snover, the creator of PowerShell. With his departure from Microsoft, Jeffrey opens up about his insights, experiences, and candid opinions. From the inception of PowerShell to its current state, he shares the challenges he faced and the triumphs he celebrated. Jeffrey delves into the controversial topic of using aliases in scripts, shedding light on the pros and cons. Additionally, he offers thought-provoking perspectives on the evolving landscape of AI and his experience in AI ethics. Reflecting on his tenure at Microsoft, Jeffrey discusses the intricacies of navigating a large corporation and making a substantial impact. We also explore the concept of the "PowerShell sacred vow" and its significance. Join us for an illuminating conversation with Jeffrey Snover.
    • Inside IT Automation | E02 \ Kamen Nikolov talks about PowerCLI, PowerShell, VMware and more

    Fun

    Check out psweekly.dowst.dev for all past editions as well as a searchable archive.

    0
    January 2024 monthly "What are you working on?" thread
  • I installed some security cameras around my house and set up Shinobi using an old PC. Unfortunately the PC is too old to use the built-in detectors in Shinobi. So, I took my first dive into playing around with some image detectors.

    I wrote some python to download the daily recording from old PC to a newer one with a 3080 GPU. Then checks the videos for people. It will then trim the videos to only include times were there are people in frame. It cut my the storage requirements by over 95%.

  • I haven't seen a [#PowerShell](https://fosstodon.org/tags/PowerShell) [#Podcast](https://fosstodon.org/tags/Podcast) account in the fediverse, but I talked to them anyway 😉
  • Joel "Jaykul" Bennet is an opinionated DevOps engineer, programmer, speaker, and Microsoft MVP.

    I love that description. I can't wait to listen to it tonight!

  • Guidance on developing locally with Azure Automation
  • Just a heads up, I received confirmation from the product team that the AZUREPS_HOST_ENVIRONMENT environment variable is going away. They are moving the backend to containers. Also, the COMPUTERNAME one that was always "client" is going to change too. The COMPUTERNAME will now be "Sandbox-###" with # being random numbers. I started using the code block below in my runbooks to find if they are running in Azure or hybrid worker/locally. It accounts for the current and the updates that will be rolling out in the near future.

    $isHybridWorker = $true
    if (($env:computername) -eq "CLIENT") {
        $isHybridWorker = $false
    }
    elseif ($env:USERNAME -eq 'ContainerAdministrator') {
        $isHybridWorker = $false
    }
    ``
  • Guidance on developing locally with Azure Automation
  • Typically, when I have a script I need to test locally, I’ll comment out the identity connection command and just authenticate outside of my script. If I’m feeling real fancy, I’ll write a try/catch to attempt to authenticate first as the managed identity then if it fails prompt me for credentials. Not the most elegant solution, but it works.

    try {
        Add-AzAccount -Identity -SubscriptionId $SubscriptionId -ErrorAction Stop | Out-Null
    }    
    catch {
        Add-AzAccount -SubscriptionId $SubscriptionId
    }
    
  • Most and Least Verbose Programming Languages
  • For some reason their API would not return anything for assembly. I was curious to see where it would rank too,

  • Patch Tuesday 8 August 2023
  • Biggest things I'm seeing is CVE-2023-21709 for Exchange requires a PowerShell script to be run after patching. Also, CVE-2023-29328/29330 for Teams affect all devices (Windows, Mac, iOS, and Android).