# Especially do not write:
[System.IO.File]::ReadAllText(".\README.md")
# Although you can write:
Push-Location $PSScriptRoot
# It would be better to write:
Get-Content -Path (Join-Path -Path $PSScriptRoot -ChildPath README.md)
# Or to use string concatenation:
Get-Content "$PSScriptRoot\README.md"
# For calling .net methods, pass full paths:
[System.IO.File]::ReadAllText("$PSScriptRoot\README.md")
# Optionally by calling Convert-Path
Push-Location $PSScriptRoot
[System.IO.File]::ReadAllText((Convert-Path README.md))