Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdhitsolutions/pspivottable
A command to create an Excel-like Pivot table in the PowerShell console.
https://github.com/jdhitsolutions/pspivottable
powershell powershell-module
Last synced: about 2 months ago
JSON representation
A command to create an Excel-like Pivot table in the PowerShell console.
- Host: GitHub
- URL: https://github.com/jdhitsolutions/pspivottable
- Owner: jdhitsolutions
- License: mit
- Created: 2015-09-26T16:35:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-23T20:33:17.000Z (about 6 years ago)
- Last Synced: 2024-10-12T21:06:45.972Z (3 months ago)
- Topics: powershell, powershell-module
- Language: PowerShell
- Size: 29.3 KB
- Stars: 27
- Watchers: 4
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.txt
- License: License.txt
Awesome Lists containing this project
README
# PSPivotTable
A PowerShell function to create an Excel-like Pivot table in the PowerShell console. This command takes the result of a PowerShell expression and creates a pivot table object. You can use this object to analyze data patterns. For example, you could get a directory listing and then prepare a table showing the size of different file extensions for each folder.## SYNTAX
New-PSPivotTable [-Data] [-yLabel ] -yProperty -xLabel [-xProperty ] []
New-PSPivotTable [-Data] [-yLabel ] -yProperty -xLabel [-Count] [-Sort ] [-SortKey ] []
New-PSPivotTable [-Data] [-yLabel ] -yProperty -xLabel [-Sum ] [-Format ] [-Round ] [-Sort ] [-SortKey ] []## EXAMPLE
PS C:\> $svc="Lanmanserver","Wuauserv","DNS","ADWS"
PS C:\> $computers="chi-dc01","chi-dc02","chi-dc04"
PS C:\> $data = Get-Service -name $svc -ComputerName $computers
PS C:\> new-pspivottable $data -ylabel Computername -yProperty Machinename -xlabel Name -xproperty Status -verbose | format-table -autosize
Computername ADWS DNS Lanmanserver Wuauserv
------------ ---- --- ------------ --------
chi-dc01 Running Running Running Running
chi-dc02 Running Stopped Running Running
chi-dc04 Running Running Running Stopped
Create a table that shows the status of each service on each computer. The yLabel parameter renames the property so that instead of Machinename it shows Computername. The xLabel is the property name to analyze, in this case the service name. The xProperty value of each service becomes the table value._Last updated: September 8, 2016_