Public/Add-MSPBackupOracleDBEntry.ps1

Function Add-MSPBackupOracleDBEntry {
    <#
        .SYNOPSIS
            Create new Oracle server entry.
        .DESCRIPTION
            Create new Oracle server entry.
        .PARAMETER LocalBackupDir
            Path to temporary directory to use during backup.
        .PARAMETER Name
            Name of the Oracle server entry, non-empty.
        .PARAMETER Password
            Password to use to connect to server.
        .PARAMETER User
            Username to use to connect to server.
        .INPUTS
            None
        .OUTPUTS
            None
        .EXAMPLE
            Add-MSPBackupOracleDBEntry
        .LINK
            about_functions_advanced
        .LINK
            about_CommonParameters
    #>

    [CmdletBinding(SupportsShouldProcess = $true)]
    [OutputType('System.String')]
    Param(
        [Parameter(Mandatory = $true)]
        [String]$LocalBackupDir,
        [Parameter(Mandatory = $true)]
        [String]$Name,
        [Parameter(Mandatory = $true)]
        [securestring]$Password,
        [Parameter(Mandatory = $true)]
        [String]$User
    )
    Begin {
        Write-Verbose ('{0}:: Function started' -f $MyInvocation.MyCommand)
        $stdOutTempFile = [System.IO.Path]::GetTempFileName()
        $stdErrTempFile = [System.IO.Path]::GetTempFileName()
    }
    Process {
        Write-Verbose ('{0}:: Getting status' -f $MyInvocation.MyCommand)
        $Status = & $Script:CmdPath -machine-readable control.oracledb.add
    }
    End {
        Write-Verbose ('{0}:: Function ended' -f $MyInvocation.MyCommand)
        Return $Status
    }
}