Skip to content

Instantly share code, notes, and snippets.

@lg
Created June 9, 2019 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lg/507c3e643d8c5d9b2d47f35eb8eb7193 to your computer and use it in GitHub Desktop.
Save lg/507c3e643d8c5d9b2d47f35eb8eb7193 to your computer and use it in GitHub Desktop.
current line in script
$tocontinue = $MyInvocation.MyCommand.ScriptBlock.ToString().split([Environment]::NewLine)[(Get-PSCallStack).Position.StartLineNumber,-1] -join [Environment]::NewLine | Out-String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment