pwshguy (mdowst)

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

  • 57 Posts
  • 38 Comments
Joined 1 year ago
cake
Cake day: June 8th, 2023

help-circle





  • 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.













  • 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.













  • 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
    }
    ``

  • 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
    }