Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OpenMode Enumeration

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Defines how an item, such as a file, is opened. This class is included in this SDK for completeness only. The members of this class cannot be used directly, nor should this class be used to derive other classes.

Namespace:   Microsoft.PowerShell.Commands
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

Public Enumeration OpenMode

Member nameDescription
Add

This opens the file for appending (similar to FileMode.Append)

New

The file must be created new. If the file exists it is an error (similar to FileMode.CreateNew)

Overwrite

Creates a new file, if the file already exists it is overwritten (similar to FileMode.Create)

Return to top
Show: