Author: Matthew Dowst

Uncategorized

PowerShell Weekly Redesign!

I am pleased to announce that PowerShell Weekly has been redesigned and moved to its own sub-site psweekly.dowst.dev. All past posts and links are available there as well. What’s New New look and feel Thumbnails for every link Improved searching of the 2,000+ links Search by keyword, date, author, category Custom RSS Feed specifically the links
AzureSecurity

Find Java Based Azure App Services

A quick Azure PowerShell command to locate any Java based Azure App Services and Functions so you can check if they are vulnerable to the CVE-2021-44228 Apache Log4j2 vulnerability. Get-AzWebApp | ForEach-Object{ Get-AzWebApp -ResourceGroupName $_.ResourceGroup -Name $_.Name | Select-Object -Property Name, @{l='JavaVersion';e={$_.SiteConfig.JavaVersion}}, ResourceGroup, Id } | Format-Table
Azure

Resubmit Azure Automation Runbook Job

This snippet will allow you to re-run any Azure Automation Runbook job with the same parameters and in the same context (Azure or Hybrid Worker Group). # Set the variables from the previous job $AutomationAccountName = '' $ResourceGroupName = '' $JobId = '' # Get the previous job $AutoAccount = @{ AutomationAccountName = $AutomationAccountName ResourceGroupName = $ResourceGroupName } $PreviousJob =...
Azure

Copy Azure Permissions

I was replacing an old service account with a service principal, and needed to replicate the permissions in Azure. I was able to do that without missing anything, using the command below. $CopyFrom = 'Object to copy from' $CopyTo = 'Object to copy to' Get-AzRoleAssignment -ObjectId $CopyFrom | ForEach-Object{ New-AzRoleAssignment -ObjectId $CopyTo -RoleDefinitionId $_.RoleDefinitionId -Scope $_.Scope }