poshoholic.com
PowerShell Quick Tip: How to retrieve the current line number and file name in your PowerShell script
(aka How to add C-style __LINE__ and __FILE__ macros to PowerShell) When troubleshooting PowerShell scripts, it can be useful to log, store or output the current line number and and file name posit…