Export-Csv
exports a table of object properties and their values. Since your script is producing string objects, and the only property they have is length, that’s what you got.
If you just want to save the list, use Out-File
or Set-Content
instead of Export-Csv
.
More Related Contents:
- Create objects with custom properties containing derived filesystem path information and export them to a CSV – calculated properties
- Using Powershell environmental variables as strings when outputting files
- Powershell script to delete 15 days old .txt files [duplicate]
- How to run an EXE file in PowerShell with parameters with spaces and quotes
- Use PowerShell to run virus scan on multiple servers
- Unable to access UNC Paths in Powershell remote session
- Fastest Way to get a uniquely index item from the property of an array
- PowerShell IE9 ComObject has all null properties after navigating to webpage
- PowerShell script runs when pasted into the PowerShell window, but not when run from shortcut
- PowerShell’s Invoke-RestMethod equivalent of curl -u (Basic Authentication)
- Maximize window and bring it in front with powershell
- How do I run a PowerShell script when the computer starts?
- ConvertTo-Csv Output without quotes
- PowerShell – get process ID of called application
- Can the following Nested foreach loop be simplified in PowerShell?
- Add Write-Progress to Get-Job/Wait-Job
- Powershell with exchange– How do I append all verbose output to a file
- How to handle command-line arguments in PowerShell
- How to send email with PowerShell
- How to split string by string in Powershell
- Powershell: Colon in commandlet parameters
- Passing PowerShell variables into a script block
- Why is $false -eq “” true?
- powershell function switch param with string array
- In Powershell what is the idiomatic way of converting a string to an int?
- PowerShell is missing the terminator: “
- Using PowerShell to remove lines from a text file if it contains a string
- How to execute a PowerShell script only before a web deploy Publish task in VS 2012?
- Jenkins powershell plugin is running 32 bit Powershell and I need 64bit
- Pass function as a parameter