function Expand-Path { <# .SYNOPSIS Will ensure we are using the full path. Especially handy with '~/' paths .PARAMETER Path The path to be expanded. Typically used with a relative path e.g. ~/.ssh -> C:\Users\\.ssh\ #> [CmdletBinding()] [OutputType([string])] param ( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [string]$Path ) return ($ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Path)) }