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

PI Powershell

ResetPIAFLinkModuleDatabaseFromAF Class

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

Reset the PI Module Database based on elements in the synchronized AF Element

The Reset-PIAFLinkModuleDatabaseFromAF cmdlet will perform a "Reset MDB". This means the current contents of the PI Module Database will be deleted (exluding %OSI, %OSI_MCN and %OSI_ManagedPI) and recreated using the contents of the Root AF Element of the associated AF Database. The associated AF Server, AF Database, and AF Root Element can be found in the Module Database at: %OSI\MDB-AFMigrationData under the properties PISystem, AFDB, and RootElement, respectively.

The connection parameter specifies the connection to a PI Data Archive to use.

WARNING: This cmdlet should only be used if the potential ramifications are understood. Contact OSIsoft Technical Support if there are any questions about whether a "Reset MDB" is appropriate for a given situation.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellResetPIAFLinkModuleDatabaseFromAF

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

Syntax

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

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

The ResetPIAFLinkModuleDatabaseFromAF type exposes the following members.

Constructors

Properties

  NameDescription
Public property
Connection

Connection to a PI Data Archive to use

Examples

Reset-PIAFLinkModuleDatabaseFromAF -Connection $con

Where:

$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"

Initiates a reset of the PI Module Database using the contents of the associated AF Root Element.

See Also

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