Skip to content

Show-MemoryMappedFile

SYNOPSIS

Continuously displays the contents of a memory-mapped file in the console.

SYNTAX

__AllParameterSets

Show-MemoryMappedFile [-Name] <string> [[-RefreshSeconds] <int>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases, {{Insert list of aliases}}

DESCRIPTION

This function reads and displays the contents of a specified memory-mapped file in a loop, refreshing the view at a user-defined interval. It uses Read-MemoryMappedFileContent to retrieve data and clears the console after each refresh cycle.

EXAMPLES

EXAMPLE 1

Show-MemoryMappedFile -Name 'SharedBuffer' -RefreshSeconds 2

Output:

Data: Hello from another process!
Timestamp: 2025-06-01T12:00:00

Continuously displays the content of the 'SharedBuffer' memory-mapped file, refreshing every 2 seconds.

PARAMETERS

-Name

The name of the memory-mapped file to read and display.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-RefreshSeconds

The number of seconds to wait between refreshes of the displayed content.

Type: System.Int32
DefaultValue: 1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

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

INPUTS

OUTPUTS

NOTES