internal/functions/Get-DbaPathSep.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function Get-DbaPathSep {
    <#
    Gets the instance path separator, if exists, or return the default one
       #>

    [CmdletBinding()]
    param (
        [object]$Server
    )

    $pathSep = $Server.PathSeparator
    if ($pathSep.Length -eq 0) {
        $pathSep = '\'
    }
    return $pathSep
}