From 0aaa23cd8656f0b92f2fac3cd8e6be68eed7d809 Mon Sep 17 00:00:00 2001 From: HarmJ0y Date: Mon, 12 Dec 2016 21:05:08 -0500 Subject: first take at platyPS doc generation --- docs/Recon/Export-PowerViewCSV.md | 117 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100755 docs/Recon/Export-PowerViewCSV.md (limited to 'docs/Recon/Export-PowerViewCSV.md') diff --git a/docs/Recon/Export-PowerViewCSV.md b/docs/Recon/Export-PowerViewCSV.md new file mode 100755 index 0000000..1597249 --- /dev/null +++ b/docs/Recon/Export-PowerViewCSV.md @@ -0,0 +1,117 @@ +# Export-PowerViewCSV + +## SYNOPSIS +Converts objects into a series of comma-separated (CSV) strings and saves the +strings in a CSV file in a thread-safe manner. + +Author: Will Schroeder (@harmj0y) +License: BSD 3-Clause +Required Dependencies: None + +## SYNTAX + +``` +Export-PowerViewCSV -InputObject [-Path] [[-Delimiter] ] [-Append] +``` + +## DESCRIPTION +This helper exports an -InputObject to a .csv in a thread-safe manner +using a mutex. +This is so the various multi-threaded functions in +PowerView has a thread-safe way to export output to the same file. +Uses .NET IO.FileStream/IO.StreamWriter objects for speed. + +Originally based on Dmitry Sotnikov's Export-CSV code: http://poshcode.org/1590 + +## EXAMPLES + +### -------------------------- EXAMPLE 1 -------------------------- +``` +Get-DomainUser | Export-PowerViewCSV -Path "users.csv" +``` + +### -------------------------- EXAMPLE 2 -------------------------- +``` +Get-DomainUser | Export-PowerViewCSV -Path "users.csv" -Append -Delimiter '|' +``` + +## PARAMETERS + +### -InputObject +Specifies the objects to export as CSV strings. + +```yaml +Type: PSObject[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Path +Specifies the path to the CSV output file. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Delimiter +Specifies a delimiter to separate the property values. +The default is a comma (,) + +```yaml +Type: Char +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: , +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Append +Indicates that this cmdlet adds the CSV output to the end of the specified file. +Without this parameter, Export-PowerViewCSV replaces the file contents without warning. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +## INPUTS + +### PSObject + +Accepts one or more PSObjects on the pipeline. + +## OUTPUTS + +## NOTES + +## RELATED LINKS + +[http://poshcode.org/1590 +http://dmitrysotnikov.wordpress.com/2010/01/19/Export-Csv-append/](http://poshcode.org/1590 +http://dmitrysotnikov.wordpress.com/2010/01/19/Export-Csv-append/) + -- cgit v1.2.3