Skip to main content
100%

Power Query CurrentUser via a lightweight PowerShell HTTP API

✓ Published0🌍 Public
HHugoberry
Last edited Apr 2, 2017
Created on Apr 1, 2017

This example demonstrates how Power Query can obtain the current Windows user by querying a lightweight PowerShell HTTP API. It shows the result of a `whoami` command wrapped in a JSON response. The Power Query code uses `Web.Contents` to call the local HTTP endpoint at `http://localhost:8888/?command=whoami`, and then parses the returned JSON with `Json.Document`. The underlying HTTP API service is built from a PowerShell script, based on the referenced blog post, which executes commands and returns their output. This approach provides a simple bridge between Power Query’s data-fetching capabilities and PowerShell’s system introspection.

AI-generated description

Similar vizzes