PowerShell Comment-based help Script comment-based help



    Reads a CSV file and filters it.

    The ReadUsersCsv.ps1 script reads a CSV file and filters it on the 'UserName' column.

    Specifies the path of the CSV input file.

    None. You cannot pipe objects to ReadUsersCsv.ps1.

    None. ReadUsersCsv.ps1 does not generate any output.

    C:\PS> .\ReadUsersCsv.ps1 -Path C:\Temp\Users.csv -UserName j.doe


Import-Csv -Path $Path | Where-Object -FilterScript {$_.UserName -eq $UserName}

The above script documentation can be displayed by running Get-Help -Name ReadUsersCsv.ps1 -Full:

enter image description here