Skip to content

Out-Notepad

SYNOPSIS

Output text to Notepad.

SYNTAX

Out-Notepad [-Text] <String> [<CommonParameters>]

DESCRIPTION

This function outputs the provided text to Notepad. It accepts text input from the pipeline or as a parameter, opens Notepad, and writes the text into it using Windows API calls.

EXAMPLES

EXAMPLE 1

Out-Notepad -Text "Hello, World!"

Opens Notepad and displays the text "Hello, World!".

EXAMPLE 2

"Line 1", "Line 2", "Line 3" | Out-Notepad

Opens Notepad and displays the provided lines of text.

PARAMETERS

-Text

The text to be displayed in Notepad. Accepts input from the pipeline or as a parameter.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
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

NOTES