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

PI Powershell

ResetAFServerIndex Class

  • Last UpdatedDec 15, 2025
  • 2 minute read
ResetAFServerIndex Class

Rebuilds every index in the PI AF SQL Server database.

This method will completely rebuild every index in the PI AF SQL database. This substantially improves the PI AF server's performance after a massive data insertion.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellResetAFServerIndex

Namespace:  OSIsoft.PowerShell
Assembly:  OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)

Syntax

[CmdletAttribute("Reset", "AFServerIndex", SupportsShouldProcess = true)]
public class ResetAFServerIndex : OSICmdletBase
<CmdletAttribute("Reset", "AFServerIndex", SupportsShouldProcess := true)>
Public Class ResetAFServerIndex
	Inherits OSICmdletBase

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

The ResetAFServerIndex type exposes the following members.

Constructors

  NameDescription
Public method
ResetAFServerIndex

Properties

  NameDescription
Public property
AFServer

Instance of the AFServer

Examples

$afServer | Reindex-AFServer

Where:

$afServer = Get-AFServer -Name "AFServerMachineName"

Rebuilds every index in the PI AF SQL Server database.

See Also

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