$Dir = Get-ChildItem C:\inetpub -recurse `
$List = $Dir | where {$_.extension -eq ".rpt"} `
$List | Format-Table FullName -hideTableHeaders | Out-File C:\inetpub\ReportsOnDriveC.txt
Here's my error message:
Get-ChildItem : A positional parameter cannot be found that accepts argument '='. At C:\Users\Administrator\Documents\list reports on drive c.ps1:1 char:21 + $Dir = Get-ChildItem <<<< C:\inetpub -recurse ` + CategoryInfo : InvalidArgument: (:) [Get-ChildItem], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand