Skip to content

Commit

Permalink
feat: Get-WebSocket -Filter ( Fixes #42 )
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed Jan 5, 2025
1 parent 8e1be05 commit d7954e2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/Get-WebSocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ The subprotocol used by the websocket. If not provided, this will default to `j
|----------|--------|--------|-------------|
|`[String]`|false |named |false |

#### **Filter**
One or more filters to apply to the output of the WebSocket.
These can be strings, regexes, scriptblocks, or commands.
If they are strings or regexes, they will be applied to the raw text.
If they are scriptblocks, they will be applied to the deserialized JSON.
These filters will be run within the WebSocket job.

|Type |Required|Position|PipelineInput|
|--------------|--------|--------|-------------|
|`[PSObject[]]`|false |named |false |

#### **WatchFor**
If set, will watch the output of a WebSocket job for one or more conditions.
The conditions are the keys of the dictionary, and can be a regex, a string, or a scriptblock.
Expand Down Expand Up @@ -313,5 +324,5 @@ RunspacePools allow you to limit the scope of the handler to a pool of runspaces

### Syntax
```PowerShell
Get-WebSocket [[-WebSocketUri] <Uri>] [-QueryParameter <IDictionary>] [-Handler <ScriptBlock>] [-Variable <IDictionary>] [-Name <String>] [-InitializationScript <ScriptBlock>] [-BufferSize <Int32>] [-OnConnect <ScriptBlock>] [-OnError <ScriptBlock>] [-OnOutput <ScriptBlock>] [-OnWarning <ScriptBlock>] [-Watch] [-RawText] [-Binary] [-SubProtocol <String>] [-WatchFor <IDictionary>] [-TimeOut <TimeSpan>] [-PSTypeName <String[]>] [-Maximum <Int64>] [-ConnectionTimeout <TimeSpan>] [-Runspace <Runspace>] [-RunspacePool <RunspacePool>] [<CommonParameters>]
Get-WebSocket [[-WebSocketUri] <Uri>] [-QueryParameter <IDictionary>] [-Handler <ScriptBlock>] [-Variable <IDictionary>] [-Name <String>] [-InitializationScript <ScriptBlock>] [-BufferSize <Int32>] [-OnConnect <ScriptBlock>] [-OnError <ScriptBlock>] [-OnOutput <ScriptBlock>] [-OnWarning <ScriptBlock>] [-Watch] [-RawText] [-Binary] [-SubProtocol <String>] [-Filter <PSObject[]>] [-WatchFor <IDictionary>] [-TimeOut <TimeSpan>] [-PSTypeName <String[]>] [-Maximum <Int64>] [-ConnectionTimeout <TimeSpan>] [-Runspace <Runspace>] [-RunspacePool <RunspacePool>] [<CommonParameters>]
```

0 comments on commit d7954e2

Please sign in to comment.