Skip to content

Unregister‑ShpMcpServer

Raimund edited this page Aug 12, 2026 · 1 revision

SYNOPSIS

Detaches an MCP server and stops its process.

SYNTAX

Name (Default)

Unregister-ShpMcpServer [-Name] <String> [-StopTimeoutSec <Int32>] 
 [-WhatIf] [-Confirm] [<CommonParameters>]

All

Unregister-ShpMcpServer [-All] [-StopTimeoutSec <Int32>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Removes the server from the session and shuts its process down using the protocol's own sequence: close the child's standard input, wait for it to exit, and terminate it if it does not.

Termination kills the whole process tree, so a server that started children of its own does not leave them running.

Its tools stop being offered to the model from the next Invoke-Shp call.

EXAMPLES

EXAMPLE 1

Unregister-ShpMcpServer -Name files

Detaches one server and stops its process.

EXAMPLE 2

Unregister-ShpMcpServer -All

Detaches every server, leaving no child processes behind.

PARAMETERS

-All

Detach every attached server.

Type: SwitchParameter
Parameter Sets: All
Aliases:

Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Name

The alias of the server to detach. Supports wildcards.

Type: String
Parameter Sets: Name
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-StopTimeoutSec

How long to wait for a clean exit before terminating. Default 5.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

None.

NOTES

RELATED LINKS

Register-ShpMcpServer

Get-ShpMcpServer

Clone this wiki locally