@@ -8,8 +8,6 @@ Convert from a CSVM-formatted string.
8
8
CSVM string that need to convert from.
9
9
. PARAMETER AsHashtable
10
10
Whether to output as a collection of hashtables instead of a collection of objects.
11
- . PARAMETER NoEnumerate
12
- Whether to prevent enumerates the output.
13
11
. OUTPUTS
14
12
[Hashtable[]] Result as hashtables.
15
13
[PSCustomObject[]] Result as objects.
@@ -20,8 +18,7 @@ Function ConvertFrom-CsvM {
20
18
[OutputType ([PSCustomObject []], ParameterSetName = ' PSCustomObject' )]
21
19
Param (
22
20
[Parameter (Mandatory = $True , Position = 0 , ValueFromPipeline = $True )][AllowEmptyString ()][AllowNull ()][Alias (' Input' , ' Object' )][String ]$InputObject ,
23
- [Parameter (Mandatory = $True , ParameterSetName = ' Hashtable' )][Alias (' ToHashtable' )][Switch ]$AsHashtable ,
24
- [Switch ]$NoEnumerate
21
+ [Parameter (Mandatory = $True , ParameterSetName = ' Hashtable' )][Alias (' ToHashtable' )][Switch ]$AsHashtable
25
22
)
26
23
Process {
27
24
$InputObject - isplit ' \r?\n' |
@@ -33,7 +30,7 @@ Function ConvertFrom-CsvM {
33
30
($PSCmdlet.ParameterSetName -ieq ' Hashtable' ) ? $Result : ([PSCustomObject ]$Result ) |
34
31
Write-Output
35
32
} |
36
- Write-Output - NoEnumerate:( $NoEnumerate .IsPresent )
33
+ Write-Output
37
34
}
38
35
}
39
36
<#
@@ -45,8 +42,6 @@ Convert from a CSVS-formatted string.
45
42
CSVS string that need to convert from.
46
43
. PARAMETER AsHashtable
47
44
Whether to output as a collection of hashtables instead of a collection of objects.
48
- . PARAMETER NoEnumerate
49
- Whether to prevent enumerates the output.
50
45
. OUTPUTS
51
46
[Hashtable[]] Result as hashtables.
52
47
[PSCustomObject[]] Result as objects.
@@ -57,15 +52,14 @@ Function ConvertFrom-CsvS {
57
52
[OutputType ([PSCustomObject []], ParameterSetName = ' PSCustomObject' )]
58
53
Param (
59
54
[Parameter (Mandatory = $True , Position = 0 , ValueFromPipeline = $True )][AllowEmptyString ()][AllowNull ()][Alias (' Input' , ' Object' )][String ]$InputObject ,
60
- [Parameter (Mandatory = $True , ParameterSetName = ' Hashtable' )][Alias (' ToHashtable' )][Switch ]$AsHashtable ,
61
- [Switch ]$NoEnumerate
55
+ [Parameter (Mandatory = $True , ParameterSetName = ' Hashtable' )][Alias (' ToHashtable' )][Switch ]$AsHashtable
62
56
)
63
57
Process {
64
58
$Null = $InputObject -imatch ' ;'
65
59
(ConvertFrom-Csv - InputObject $InputObject - Delimiter ' ;' - Header @ (0 .. ($Matches.Count + 1 ))).PSObject.Properties.Value |
66
60
Join-String - Separator " `n " |
67
61
ConvertFrom-CsvM - AsHashtable:($PSCmdlet.ParameterSetName -ieq ' Hashtable' ) |
68
- Write-Output - NoEnumerate:( $NoEnumerate .IsPresent )
62
+ Write-Output
69
63
}
70
64
}
71
65
<#
0 commit comments