Powershell works ;)

SCRIPTING BLOG

  • How to Measure Script Runtime in PowerShell

    This is a short Blogpost, but very useful. When writing scripts, it is often important to understand how long a script or command takes to execute. Measuring script runtime can help identify slow operations, analyze performance, and improve automation processes. In many environments scripts run regularly, for example in scheduled tasks, background jobs, or Azure…

  • Why JSON Is So Powerful in PowerShell

    JSON has become one of the most important data formats in modern automation. When you are working with REST APIs, configuration files, or cloud services like Azure and Microsoft Graph, JSON appears everywhere. Fortunately, PowerShell has excellent built-in support for working with JSON, making it easy to convert between structured PowerShell objects and JSON data.…

  • Start-AzAutomationRunbook -Wait Is Not Enough

    When working with Azure Automation Runbooks, it is quite common that one runbook needs to trigger another runbook and wait for the result before continuing the process. The cmdlet Start-AzAutomationRunbook provides the parameter -Wait, which at first glance seems to solve exactly this problem. The command waits until the child runbook finishes. However, there is…

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

  • 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 only…

Erhalte Benachrichtigungen über neue Inhalte direkt per E-Mail.