Author and publish a PowerShell script module with a manifest, exported functions, and proper directory structure

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a module directory whose name matches the module: mkdir MyModule; create MyModule/MyModule.psm1 containing function definitions.
  2. Generate a manifest: New-ModuleManifest -Path ./MyModule/MyModule.psd1 -RootModule MyModule.psm1 -FunctionsToExport @('Get-MyData','Set-MyConfig') -ModuleVersion '1.0.0'
  3. Place the module directory under one of the paths in $env:PSModulePath so it can be found by name, or import by path: Import-Module ./MyModule/MyModule.psd1
  4. Verify exported members: Get-Module MyModule | Select-Object -ExpandProperty ExportedFunctions
  5. To publish to the PowerShell Gallery (requires an API key), use Publish-Module -Name MyModule -NuGetApiKey <PLACEHOLDER>.

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans