I am getting an error while executing the below. Is the below method to concatenate $env:userprofile with path correct?
$env:userprofile\Documents\DNS\GetDnsRecord.ps1 | ConvertTo-Csv -NoTypeInformation | Select-Object -Skip 1 | Out-File -Append $env:userprofile\Documents\DNS\DnsRecord.csv
Error:
+ $env:userprofile\Documents\DNS\GetDnsRecord.ps1 | ConvertTo-Csv -NoTy ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token '\Documents\DNS\GetDnsRecord.ps1' in expression or statement.
Thanks for the help
John
&and it'll work:& $env:userprofile\Documents\DNS\GetDnsRecord.ps1 | ...