Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Powershell

SetFileOptions Class

  • Last UpdatedDec 15, 2025
  • 3 minute read
SetFileOptions Class

Sets the file options used to validate an AFFile stored in the PISystem.

This method will change the FileAllowedExtensions and FileMaxLength settings that are used to validate an AFFile stored in the PISystem. To add or remove file extensions from the current list, first the current PISystem.FileAllowedExtensions, list and make changes to that list, and the pass the updated list to this method.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellSetFileOptions

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 2.2.3.0 (2.2.3.952)

Syntax

[CmdletAttribute("Set", "AFFileOptions", SupportsShouldProcess = true)]
public class SetFileOptions : OSICmdletBase
<CmdletAttribute("Set", "AFFileOptions", SupportsShouldProcess := true)>
Public Class SetFileOptions
	Inherits OSICmdletBase

Dim instance As SetFileOptions
[CmdletAttribute(L"Set", L"AFFileOptions", SupportsShouldProcess = true)]
public ref class SetFileOptions : public OSICmdletBase
[<CmdletAttribute("Set", "AFFileOptions", SupportsShouldProcess = true)>]
type SetFileOptions =  
    class
        inherit OSICmdletBase
    end

The SetFileOptions type exposes the following members.

Constructors

  NameDescription
Public method
SetFileOptions

Properties

  NameDescription
Public property
AFServer

Instance of the AFServer

Public property
AllowedFileExtensions

File Extensions which are to be permitted

Public property
MaxFileLength

Maximum File Length to be permitted

Examples

$afServer | Set-AFFileOptions -AllowedFileExtensions "xyz" "abc" -MaxFileLength 10

Where:

$afServer = Get-AFServer -Name "AFServerMachineName"

Sets the file options used to validate an AFFile stored in the PISystem.

See Also

TitleResults for “How to create a CRG?”Also Available in