@@ -20,7 +20,7 @@ If the `-Watch` parameter is provided, will output a continous stream of objects
20
20
Create a WebSocket job that connects to a WebSocket and outputs the results.
21
21
22
22
``` PowerShell
23
- Get-WebSocket -WebSocketUri "wss://localhost:9669/"
23
+ Get-WebSocket -SocketUrl "wss://localhost:9669/"
24
24
```
25
25
Get is the default verb, so we can just say WebSocket.
26
26
` -Watch ` will output a continous stream of objects from the websocket.
@@ -146,20 +146,20 @@ $somePosts |
146
146
---
147
147
148
148
### Parameters
149
- #### ** WebSocketUri **
149
+ #### ** SocketUrl **
150
150
The WebSocket Uri.
151
151
152
- | Type | Required| Position| PipelineInput | Aliases |
153
- | -------| --------| --------| ---------------------| ----------------------------|
154
- | ` [Uri] ` | false | 1 | true (ByPropertyName)| Url<br />Uri<br />WebSocketUrl|
152
+ | Type | Required| Position| PipelineInput | Aliases |
153
+ | -------| --------| --------| ---------------------| --------------------------------------------- |
154
+ | ` [Uri] ` | false | 1 | true (ByPropertyName)| Url<br />Uri<br />WebSocketUri< br /> WebSocketUrl|
155
155
156
156
#### ** RootUrl**
157
157
One or more root urls.
158
158
If these are provided, a WebSocket server will be created with these listener prefixes.
159
159
160
- | Type | Required| Position| PipelineInput | Aliases |
161
- | ------------| --------| --------| ---------------------| --------------------------------------------------------------------------------------------------- |
162
- | ` [String[]] ` | false | 2 | true (ByPropertyName)| HostHeader<br />Host<br />CNAME< br />ServerURL <br />ListenerPrefix<br />ListenerPrefixes<br />ListenerUrl|
160
+ | Type | Required| Position| PipelineInput | Aliases |
161
+ | ------------| --------| --------| ---------------------| -------------------------------------------------------------------------------------|
162
+ | ` [String[]] ` | true | 1 | true (ByPropertyName)| HostHeader<br />Host<br />CNAME<br />ListenerPrefix<br />ListenerPrefixes<br />ListenerUrl|
163
163
164
164
#### ** Route**
165
165
A route table for all requests.
@@ -179,9 +179,9 @@ This will be displayed when visiting the root url.
179
179
#### ** PaletteName**
180
180
The name of the palette to use. This will include the [ 4bitcss] ( https://4bitcss.com ) stylesheet.
181
181
182
- | Type | Required| Position| PipelineInput| Aliases |
183
- | ----------| --------| --------| -------------| ----------------------------------------|
184
- | ` [String] ` | false | named | false | Palette<br />ColorScheme<br />ColorPalette|
182
+ | Type | Required| Position| PipelineInput | Aliases |
183
+ | ----------| --------| --------| --------------------- | ----------------------------------------|
184
+ | ` [String] ` | false | named | true (ByPropertyName) | Palette<br />ColorScheme<br />ColorPalette|
185
185
186
186
#### ** GoogleFont**
187
187
The [ Google Font] ( https://fonts.google.com/ ) name.
@@ -214,11 +214,11 @@ A javascript import map. This allows you to import javascript modules.
214
214
215
215
#### ** QueryParameter**
216
216
A collection of query parameters.
217
- These will be appended onto the ` -WebSocketUri ` .
217
+ These will be appended onto the ` -SocketUrl ` .
218
218
219
- | Type | Required| Position| PipelineInput|
220
- | ---------------| --------| --------| -------------|
221
- | ` [IDictionary] ` | false | named | false |
219
+ | Type | Required| Position| PipelineInput |
220
+ | ---------------| --------| --------| --------------------- |
221
+ | ` [IDictionary] ` | false | named | true (ByPropertyName) |
222
222
223
223
#### ** Handler**
224
224
A ScriptBlock that will handle the output of the WebSocket.
@@ -322,9 +322,9 @@ If set, will force a new job to be created, rather than reusing an existing job.
322
322
#### ** SubProtocol**
323
323
The subprotocol used by the websocket. If not provided, this will default to ` json ` .
324
324
325
- | Type | Required| Position| PipelineInput|
326
- | ----------| --------| --------| -------------|
327
- | ` [String] ` | false | named | false |
325
+ | Type | Required| Position| PipelineInput |
326
+ | ----------| --------| --------| --------------------- |
327
+ | ` [String] ` | false | named | true (ByPropertyName) |
328
328
329
329
#### ** Filter**
330
330
One or more filters to apply to the output of the WebSocket.
@@ -333,18 +333,18 @@ If they are strings or regexes, they will be applied to the raw text.
333
333
If they are scriptblocks, they will be applied to the deserialized JSON.
334
334
These filters will be run within the WebSocket job.
335
335
336
- | Type | Required| Position| PipelineInput|
337
- | --------------| --------| --------| -------------|
338
- | ` [PSObject[]] ` | false | named | false |
336
+ | Type | Required| Position| PipelineInput |
337
+ | --------------| --------| --------| --------------------- |
338
+ | ` [PSObject[]] ` | false | named | true (ByPropertyName) |
339
339
340
340
#### ** WatchFor**
341
341
If set, will watch the output of a WebSocket job for one or more conditions.
342
342
The conditions are the keys of the dictionary, and can be a regex, a string, or a scriptblock.
343
343
The values of the dictionary are what will happen when a match is found.
344
344
345
- | Type | Required| Position| PipelineInput| Aliases |
346
- | ---------------| --------| --------| -------------| ----------------------|
347
- | ` [IDictionary] ` | false | named | false | WhereFor<br />Wherefore|
345
+ | Type | Required| Position| PipelineInput | Aliases |
346
+ | ---------------| --------| --------| --------------------- | ----------------------|
347
+ | ` [IDictionary] ` | false | named | true (ByPropertyName) | WhereFor<br />Wherefore|
348
348
349
349
#### ** TimeOut**
350
350
The timeout for the WebSocket connection. If this is provided, after the timeout elapsed, the WebSocket will be closed.
@@ -357,9 +357,9 @@ The timeout for the WebSocket connection. If this is provided, after the timeou
357
357
If provided, will decorate the objects outputted from a websocket job.
358
358
This will only decorate objects converted from JSON.
359
359
360
- | Type | Required| Position| PipelineInput| Aliases |
361
- | ------------| --------| --------| -------------| ---------------------------------------|
362
- | ` [String[]] ` | false | named | false | PSTypeNames<br />Decorate<br />Decoration|
360
+ | Type | Required| Position| PipelineInput | Aliases |
361
+ | ------------| --------| --------| --------------------- | ---------------------------------------|
362
+ | ` [String[]] ` | false | named | true (ByPropertyName) | PSTypeNames<br />Decorate<br />Decoration|
363
363
364
364
#### ** Maximum**
365
365
The maximum number of messages to receive before closing the WebSocket.
@@ -379,25 +379,25 @@ The throttle limit used when creating background jobs.
379
379
The maximum time to wait for a connection to be established.
380
380
By default, this is 7 seconds.
381
381
382
- | Type | Required| Position| PipelineInput|
383
- | ------------| --------| --------| -------------|
384
- | ` [TimeSpan] ` | false | named | false |
382
+ | Type | Required| Position| PipelineInput |
383
+ | ------------| --------| --------| --------------------- |
384
+ | ` [TimeSpan] ` | false | named | true (ByPropertyName) |
385
385
386
386
#### ** Runspace**
387
387
The Runspace where the handler should run.
388
388
Runspaces allow you to limit the scope of the handler.
389
389
390
- | Type | Required| Position| PipelineInput|
391
- | ------------| --------| --------| -------------|
392
- | ` [Runspace] ` | false | named | false |
390
+ | Type | Required| Position| PipelineInput |
391
+ | ------------| --------| --------| --------------------- |
392
+ | ` [Runspace] ` | false | named | true (ByPropertyName) |
393
393
394
394
#### ** RunspacePool**
395
395
The RunspacePool where the handler should run.
396
396
RunspacePools allow you to limit the scope of the handler to a pool of runspaces.
397
397
398
- | Type | Required| Position| PipelineInput| Aliases|
399
- | ----------------| --------| --------| -------------| -------|
400
- | ` [RunspacePool] ` | false | named | false | Pool |
398
+ | Type | Required| Position| PipelineInput | Aliases|
399
+ | ----------------| --------| --------| --------------------- | -------|
400
+ | ` [RunspacePool] ` | false | named | true (ByPropertyName) | Pool |
401
401
402
402
#### ** IncludeTotalCount**
403
403
@@ -421,5 +421,8 @@ RunspacePools allow you to limit the scope of the handler to a pool of runspaces
421
421
422
422
### Syntax
423
423
``` PowerShell
424
- Get-WebSocket [[-WebSocketUri] <Uri>] [[-RootUrl] <String[]>] [-Route <IDictionary>] [-HTML <String>] [-PaletteName <String>] [-GoogleFont <String>] [-CodeFont <String>] [-JavaScript <String[]>] [-ImportMap <IDictionary>] [-QueryParameter <IDictionary>] [-Handler <ScriptBlock>] [-Variable <IDictionary>] [-Name <String>] [-InitializationScript <ScriptBlock>] [-BufferSize <Int32>] [-Broadcast <PSObject>] [-OnConnect <ScriptBlock>] [-OnError <ScriptBlock>] [-OnOutput <ScriptBlock>] [-OnWarning <ScriptBlock>] [-Watch] [-RawText] [-Binary] [-Force] [-SubProtocol <String>] [-Filter <PSObject[]>] [-WatchFor <IDictionary>] [-TimeOut <TimeSpan>] [-PSTypeName <String[]>] [-Maximum <Int64>] [-ThrottleLimit <Int32>] [-ConnectionTimeout <TimeSpan>] [-Runspace <Runspace>] [-RunspacePool <RunspacePool>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
424
+ Get-WebSocket [[-SocketUrl] <Uri>] [-QueryParameter <IDictionary>] [-Variable <IDictionary>] [-Name <String>] [-InitializationScript <ScriptBlock>] [-BufferSize <Int32>] [-Broadcast <PSObject>] [-OnConnect <ScriptBlock>] [-OnError <ScriptBlock>] [-OnOutput <ScriptBlock>] [-OnWarning <ScriptBlock>] [-Watch] [-RawText] [-Binary] [-Force] [-SubProtocol <String>] [-Filter <PSObject[]>] [-WatchFor <IDictionary>] [-TimeOut <TimeSpan>] [-PSTypeName <String[]>] [-Maximum <Int64>] [-ThrottleLimit <Int32>] [-ConnectionTimeout <TimeSpan>] [-Runspace <Runspace>] [-RunspacePool <RunspacePool>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
425
+ ```
426
+ ``` PowerShell
427
+ Get-WebSocket [-RootUrl] <String[]> [-Route <IDictionary>] [-HTML <String>] [-PaletteName <String>] [-GoogleFont <String>] [-CodeFont <String>] [-JavaScript <String[]>] [-ImportMap <IDictionary>] [-Handler <ScriptBlock>] [-Variable <IDictionary>] [-Name <String>] [-InitializationScript <ScriptBlock>] [-BufferSize <Int32>] [-Broadcast <PSObject>] [-Force] [-TimeOut <TimeSpan>] [-Maximum <Int64>] [-ThrottleLimit <Int32>] [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
425
428
```
0 commit comments