Skip to content

Get-MemoryMappedFile

SYNOPSIS

Retrieves an existing memory-mapped file by name.

SYNTAX

__AllParameterSets

Get-MemoryMappedFile [-Name] <string> [<CommonParameters>]

ALIASES

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

DESCRIPTION

This function attempts to open an existing memory-mapped file identified by the provided name. If the file does not exist or an error occurs during access, the function returns $null instead of throwing an exception.

EXAMPLES

EXAMPLE 1

Get-MemoryMappedFile -Name 'SharedMemoryBlock'

Output:

SafeMemoryMappedFileHandle
--------------------------
Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle

Retrieves the memory-mapped file named 'SharedMemoryBlock'.

PARAMETERS

-Name

The name of the memory-mapped file to open.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: true
  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

System.IO.MemoryMappedFiles.MemoryMappedFile

{{ Fill in the Description }}

NOTES

The memory-mapped file object if successful. null. Returned when the specified memory-mapped file does not exist or an error occurs.