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

PI Powershell

RemoveAFServer Class

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

Remove an AF Server connection configuration from local AF Server list

The Remove-AFServer cmdlet will remove an AF Server/AF Servers from the local AF Server list.

Inheritance Hierarchy

SystemObject
  InternalCommand
    Cmdlet
      PSCmdlet
        OSIsoft.PowerShellOSICmdletBase
          OSIsoft.PowerShellRemoveAFServer

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

Syntax

[CmdletAttribute("Remove", "AFServer", SupportsShouldProcess = true)]
public class RemoveAFServer : OSICmdletBase
<CmdletAttribute("Remove", "AFServer", SupportsShouldProcess := true)>
Public Class RemoveAFServer
	Inherits OSICmdletBase

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

The RemoveAFServer type exposes the following members.

Constructors

  NameDescription
Public method
RemoveAFServer

Properties

  NameDescription
Public property
AFServer

AFServer object to remove from the local AF Servers list

Public property
ID

GUID of the AF Server to remove from the local AF Servers list

Public property
Name

Name of the AF Server to remove from the local AF Servers list

Examples

Remove-AFServer -Name PIAF1

This example will remove the AF Server named "PIAF1" from the local AF Server list.

Examples

Remove-AFServer -AFServer (Get-AFServer -Name PIAF1)

This example will remove the AF Server named "PIAF1" from the local AF Server list using the Get-AFServer cmdlet to get the AF Server.

Run "Get-Help Get-AFServer -Examples" for more information on this cmdlet.

Examples

Remove-AFServer -AFServer (Get-AFServer -Default)

This example will remove the default AF Server from the local AF Server list using the Get-AFServer cmdlet to get the AF Server. The next indexed AF Server will become the new default AF Server.

See Also

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