{"id":"d582391a-39da-4d08-8633-4a723d3ab21c","task":"Author and publish a PowerShell script module with a manifest, exported functions, and proper directory structure","domain":"learn.microsoft.com","steps":["Create a module directory whose name matches the module: mkdir MyModule; create MyModule/MyModule.psm1 containing function definitions.","Generate a manifest: New-ModuleManifest -Path ./MyModule/MyModule.psd1 -RootModule MyModule.psm1 -FunctionsToExport @('Get-MyData','Set-MyConfig') -ModuleVersion '1.0.0'","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","Verify exported members: Get-Module MyModule | Select-Object -ExpandProperty ExportedFunctions","To publish to the PowerShell Gallery (requires an API key), use Publish-Module -Name MyModule -NuGetApiKey <PLACEHOLDER>."],"gotchas":["FunctionsToExport in the manifest takes precedence over Export-ModuleMember in the .psm1; using both can cause confusion — prefer the manifest entry alone.","The module directory name, .psm1 file name, and .psd1 file name must all be identical (case-insensitive on Windows, but consistent across platforms matters for cross-platform compatibility).","Dot-sourcing helper scripts inside the .psm1 is fine, but avoid exporting private helper functions; list only public functions in FunctionsToExport to keep the module surface clean."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/d582391a-39da-4d08-8633-4a723d3ab21c"}