My Technical Notes

Friday, 23 June 2017

PowerShell: Get Absolute Path from Relative Path


Function Get-AbsolutePath {
    param([string]$Path)
    
    [System.IO.Path]::GetFullPath([System.IO.Path]::Combine((Get-Location).ProviderPath, $Path));
}

No comments: