Topwater.PowerShell 0.1.0-preview.10

This is a prerelease version of Topwater.PowerShell.
dotnet add package Topwater.PowerShell --version 0.1.0-preview.10
                    
NuGet\Install-Package Topwater.PowerShell -Version 0.1.0-preview.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Topwater.PowerShell" Version="0.1.0-preview.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Topwater.PowerShell" Version="0.1.0-preview.10" />
                    
Directory.Packages.props
<PackageReference Include="Topwater.PowerShell" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Topwater.PowerShell --version 0.1.0-preview.10
                    
#r "nuget: Topwater.PowerShell, 0.1.0-preview.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Topwater.PowerShell@0.1.0-preview.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Topwater.PowerShell&version=0.1.0-preview.10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Topwater.PowerShell&version=0.1.0-preview.10&prerelease
                    
Install as a Cake Tool

Topwater.PowerShell

A pwsh program for a Topwater shell. The agent's PowerShell scripts run inside the machine: on its files and mounts, with its programs, under its limits, labels, approvals and audit trail. Nothing reaches the host.

dotnet add package Topwater.PowerShell --prerelease
using Topwater;
using Topwater.PowerShell;

var shell = new Shell().RegisterPowerShell();   // experimental: TW016

What the agent types:

pwsh -c 'Get-ChildItem /data -Recurse -File | Where-Object Length -gt 1000 | Select-Object -ExpandProperty FullName'
pwsh -c '$rows = Get-Content people.json -Raw | ConvertFrom-Json; $rows | Sort-Object Age | Select-Object -First 3'
pwsh ./report.ps1 -Year 2026

PowerShell's own parser reads the script (the System.Management.Automation package); Topwater runs a subset of the language and about thirty common cmdlets itself. using module, using assembly, using namespace and configuration are refused before the parser sees the script, since PowerShell's parser resolves them against the host while parsing. No PowerShell runspace is opened, so there are no .NET types beyond basic ones, no modules and no Add-Type; any other command name runs a program of the machine. With the bash tool, TopwaterSkillScriptRunner (Topwater.Agents) then runs .ps1 skill scripts too.

See docs/design/powershell.md for why it is built this way, the escape surface and how each way out is closed, and what isn't supported.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.10 43 12/1/2026