
SCRIPTING BLOG
-
Retrieve and Export Azure Automation Jobs with All Parameters
This PowerShell script retrieves Azure Automation jobs from the last 7 days for a specific runbook, enriches each job with missing details, normalizes all parameters, and exports everything to a CSV file for easy analysis. This can be incredibly useful for operational monitoring, auditing, and troubleshooting. In many environments, runbooks are triggered with dynamic inputContinue…
-
Why Set-ADUser Sometimes Fails Right After User Creation
When working with PowerShell in Active Directory, most scripts look simple at first. You create a user, you update some attributes, you add group memberships, and you move on. In reality, things are not always that clean, especially in environments with multiple Domain Controllers. I ran into a situation that looked strange at the beginning.Continue…
-
Get All Direct and Indirect Reports from Active Directory
This PowerShell snippet retrieves all Active Directory users that report to a specific manager, including all indirect reports, meaning the whole org tree below that manager. This is useful for scenarios like access reviews, license cleanup, delegations, offboarding, team reporting, and automation workflows where actions must apply to an entire reporting line and not onlyContinue…
-
Trigger Azure Automation Runbook with Cloned Parameters
This PowerShell script demonstrates how to re-trigger an Azure Automation runbook using the exact parameters of a previous job, while still allowing you to override individual values before starting the new run. This approach is extremely useful , especially when a runbook failed due to temporary issues or incorrect input. Instead of manually reconstructing allContinue…
-
Automatically renew access token during script execution in PowreShell
Sometimes we encounter scenarios where scripts have a longer runtime. If we are using tokens with expiration time, this can cause issues if the script runs longer than the token’s validity period. I have written a small script that automatically renews the token during script execution. This way, you don’t have to worry about managingContinue…
Erhalte Benachrichtigungen über neue Inhalte direkt per E-Mail.