DeleteOrphans Class
- Last UpdatedDec 15, 2025
- 2 minute read
Deletes orphaned child elements in the PISystem
The Delete-Orphans cmdlet allows you delete objects in the PISystem that have been orphaned. This includes any AF Elements objects that don't have a Parent Element defined.
Inheritance Hierarchy
SystemObject
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellDeleteOrphans
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellDeleteOrphans
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Remove", "AFOrphans", SupportsShouldProcess = true)] public class DeleteOrphans : OSICmdletBase
<CmdletAttribute("Remove", "AFOrphans", SupportsShouldProcess := true)> Public Class DeleteOrphans Inherits OSICmdletBase Dim instance As DeleteOrphans
[CmdletAttribute(L"Remove", L"AFOrphans", SupportsShouldProcess = true)] public ref class DeleteOrphans : public OSICmdletBase
[<CmdletAttribute("Remove", "AFOrphans", SupportsShouldProcess = true)>] type DeleteOrphans = class inherit OSICmdletBase end
The DeleteOrphans type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| DeleteOrphans |
Properties
| Name | Description | |
|---|---|---|
| AFServer | Instance of the AFServer | |
| Delay | Specify the number of minutes to delay before a modified orphaned object is deleted. The value should be greater or equal to zero. |
Examples
$afServer | Remove-AFOrphans -Delay 0Where:
$afServer = Get-AFServer -Name "AFServerMachineName"
Deletes all orphaned child element objects in the PISystem immediately (no delay).