liveBook · Manning

Agent-based remoting

As explained in Practical Automation with PowerShell: Effective scripting from the console to the cloud

Agent-based remoting is remote script execution in which a locally installed software agent runs the script on the target device.

Agent-based remoting runs a PowerShell script on a target device through locally installed software rather than a direct remoting connection. Third-party platforms such as Jenkins nodes, Azure Automation Hybrid Runbook Workers, HPE Operations Agents, and System Center Orchestrator Runbook Workers commonly provide this execution layer. section 5.6

The agent typically handles permissions and authentication, reducing the connection work required by PowerShell remoting. The design tradeoff is the absence of a control script: scripts must return collected data and record actions or results themselves. section 5.6

Adapt scripts for agent execution by:

  • Writing output to a centralized destination such as a domain file share, FTP site, or cloud storage. section 5.6
  • Logging execution and results even when the script performs an action instead of collecting information. section 5.6
  • Protecting centralized writes from conflicts when multiple machines run the script simultaneously. section 5.6

Collecting VS Code extensions

A remote agent can search user-level VS Code extension directories for .vsixmanifest files, extract extension metadata, and export the results to a predetermined CSV on a network share. This approach supports fleet-wide discovery when system-level scanning tools miss per-user installations. section 5.0 section 5.6

Figure 5.10 Example workflow for collecting data returned by remote agent executions to a central location

Follow the workflow for collecting results from multiple agent executions into one protected central location. section 5.6

How Practical Automation with PowerShell: Effective scripting from the console to the cloud covers it

How deep it goes
Explains agent execution, missing control scripts, centralized collection, and write conflicts, but defers platform-specific setup.
Examples
Uses VS Code extension discovery, network-share CSV output, and agents supplied by Jenkins, Azure Automation, HPE Operations, and System Center.
What you can do after
Apply it via centralized files, FTP, or cloud storage while logging results and preventing simultaneous-write conflicts.
How it connects
Connects agent-based remoting with PowerShell remoting, hypervisor-based remoting, SSH remoting, group policy, and configuration management.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Practical Automation with PowerShell: Effective scripting from the console to the cloud. The section links point to the parts of the book it draws on.